Avoid accessing nullptr.
This commit is contained in:
parent
88719d961f
commit
df9daf8fec
@ -196,6 +196,12 @@ void
|
|||||||
ModuleManager::doLoad( const QString& moduleName )
|
ModuleManager::doLoad( const QString& moduleName )
|
||||||
{
|
{
|
||||||
Module* thisModule = m_availableModules.value( moduleName );
|
Module* thisModule = m_availableModules.value( moduleName );
|
||||||
|
if ( !thisModule )
|
||||||
|
{
|
||||||
|
cDebug() << "Module" << moduleName << "loading IMPOSSIBLE, module does not exist";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
thisModule->loadSelf();
|
thisModule->loadSelf();
|
||||||
if ( !thisModule->isLoaded() )
|
if ( !thisModule->isLoaded() )
|
||||||
cDebug() << "Module" << moduleName << "loading FAILED";
|
cDebug() << "Module" << moduleName << "loading FAILED";
|
||||||
|
Loading…
Reference in New Issue
Block a user