diff --git a/src/blackcore/context_runtime.cpp b/src/blackcore/context_runtime.cpp index 30c6e39e3..01c868276 100644 --- a/src/blackcore/context_runtime.cpp +++ b/src/blackcore/context_runtime.cpp @@ -448,7 +448,11 @@ namespace BlackCore if (this->m_contextSettings) { connect(this->m_contextSettings, &IContextSettings::changedSettings, this->m_contextSimulator, &IContextSimulator::settingsChanged); - this->m_contextSimulator->loadSimulatorPluginFromSettings(); + if (!this->m_contextSimulator->loadSimulatorPluginFromSettings()) + { + qWarning() << "No simulator plugin loaded"; + this->sendStatusMessage(CStatusMessage::getWarningMessage("No simulator plugin loaded", CStatusMessage::TypeSimulator)); + } } } diff --git a/src/blackcore/context_simulator_impl.cpp b/src/blackcore/context_simulator_impl.cpp index 97f165d12..0635da8b0 100644 --- a/src/blackcore/context_simulator_impl.cpp +++ b/src/blackcore/context_simulator_impl.cpp @@ -150,17 +150,21 @@ namespace BlackCore Q_ASSERT(this->getIContextSettings()); if (!this->getIContextSettings()) return false; - CSimulatorInfoList plugin = this->getAvailableSimulatorPlugins(); - if (plugin.size() == 1) + CSimulatorInfoList plugins = this->getAvailableSimulatorPlugins(); + if (plugins.size() == 1) { // load, independent from settings, we have only driver - return this->loadSimulatorPlugin(plugin.front()); + return this->loadSimulatorPlugin(plugins.front()); } - else if (plugin.size() > 1) + else if (plugins.size() > 1) { - return this->loadSimulatorPlugin( - this->getIContextSettings()->getSimulatorSettings().getSelectedPlugin() - ); + if (this->loadSimulatorPlugin( + this->getIContextSettings()->getSimulatorSettings().getSelectedPlugin() + )) return true; + + // we have plugins, but none got loaded + // just load first one + return this->loadSimulatorPlugin(plugins.front()); } else {