diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 2ac00c57e..d7a05ebe2 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -928,7 +928,7 @@ Settings MainWindow::getCppcheckSettings() result.jobs = mSettings->value(SETTINGS_CHECK_THREADS, 1).toInt(); result.inlineSuppressions = mSettings->value(SETTINGS_INLINE_SUPPRESSIONS, false).toBool(); result.inconclusive = mSettings->value(SETTINGS_INCONCLUSIVE_ERRORS, false).toBool(); - if (result.platformType == cppcheck::Platform::Unspecified) + if (!mProjectFile || result.platformType == cppcheck::Platform::Unspecified) result.platform((cppcheck::Platform::PlatformType) mSettings->value(SETTINGS_CHECKED_PLATFORM, 0).toInt()); result.standards.setCPP(mSettings->value(SETTINGS_STD_CPP, QString()).toString().toStdString()); result.standards.setC(mSettings->value(SETTINGS_STD_C, QString()).toString().toStdString());