diff --git a/src/libcalamaresui/modulesystem/ViewModule.cpp b/src/libcalamaresui/modulesystem/ViewModule.cpp index 2c8c073f9..f81afe659 100644 --- a/src/libcalamaresui/modulesystem/ViewModule.cpp +++ b/src/libcalamaresui/modulesystem/ViewModule.cpp @@ -51,16 +51,14 @@ ViewModule::loadSelf() if ( m_loader ) { m_viewStep = qobject_cast< ViewStep* >( m_loader->instance() ); + if ( !m_viewStep ) + { + cLog() << Q_FUNC_INFO << m_loader->errorString(); + return; + } m_viewStep->setConfigurationMap( m_configurationMap ); - if ( m_viewStep ) - { - ViewManager::instance()->addViewStep( m_viewStep ); - m_loaded = true; - } - else - { - cDebug() << Q_FUNC_INFO << m_loader->errorString(); - } + ViewManager::instance()->addViewStep( m_viewStep ); + m_loaded = true; } }