Skip to content

Commit

Permalink
STYLE: Remove Q_ASSERT from qSlicerCLIModuleFactoryHelper::modulePaths()
Browse files Browse the repository at this point in the history
Fixes #3411
  • Loading branch information
jcfr authored and lassoan committed May 5, 2020
1 parent fc8c5c6 commit d423ac9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Base/QTCLI/qSlicerCLIModuleFactoryHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@
const QStringList qSlicerCLIModuleFactoryHelper::modulePaths()
{
qSlicerCoreApplication * app = qSlicerCoreApplication::application();
Q_ASSERT(app);
if (!app)
{
qCritical("qSlicerCLIModuleFactoryHelper::modulePaths failed: qSlicerCoreApplication is not instantiated");
return QStringList();
}

// slicerHome shouldn't be empty
Q_ASSERT(!app->slicerHome().isEmpty());
if (!app->slicerHome().isEmpty())
{
qCritical("qSlicerCLIModuleFactoryHelper::modulePaths failed: app->slicerHome() is empty");
return QStringList();
}

QStringList defaultCmdLineModulePaths;
if (QFile::exists(app->slicerHome() + "/" + Slicer_CLIMODULES_LIB_DIR))
Expand Down

0 comments on commit d423ac9

Please sign in to comment.