diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 1e6dd02e6..27ad97dc6 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -447,7 +447,20 @@ namespace BlackCore this->setRemoteAircraftProvider(renderedAircraftProvider); // use simulator info from ISimulator as it can access the emulated driver settings - const CSimulatorInfo simInfo = simulator->getSimulatorInfo(); + CSimulatorInfo simInfo = simulator->getSimulatorInfo(); + if (!simInfo.isSingleSimulator()) + { + BLACK_VERIFY_X(false, Q_FUNC_INFO, "Invalid simulator from plugin"); + simInfo = CSimulatorInfo::p3d(); + if (simulator->isEmulatedDriver()) + { + CLogMessage(this).error(u"Emulated driver does NOT provide valid simulator, using default '%1', plugin: '%2'") << simInfo.toQString(true) << simulatorPluginInfo.toQString(true); + } + else + { + CLogMessage(this).error(u"Invalid driver using default '%1', plugin: '%2'") << simInfo.toQString(true) << simulatorPluginInfo.toQString(true); + } + } Q_ASSERT_X(simInfo.isSingleSimulator(), Q_FUNC_INFO, "need single simulator"); m_modelSetSimulator.set(simInfo); diff --git a/src/plugins/simulator/emulated/simulatoremulated.cpp b/src/plugins/simulator/emulated/simulatoremulated.cpp index 7b98cab38..dc4e1cf80 100644 --- a/src/plugins/simulator/emulated/simulatoremulated.cpp +++ b/src/plugins/simulator/emulated/simulatoremulated.cpp @@ -384,7 +384,11 @@ namespace BlackSimPlugin } else { - CLogMessage(this).validationError(u"No valid plugin for '%1'") << simulator.toQString(); + // not all drivers are installed + CLogMessage(this).validationError(u"No valid plugin in emulated driver for '%1'") << simulator.toQString(); + const QString sn = simulator.toQString(true); + const CSimulatorPluginInfo fakedPlugin = CSimulatorPluginInfo(simulator.toPluginIdentifier(), sn, sn, QStringLiteral("Emulated, but uninstalled '%1'").arg(sn), false); + this->setNewPluginInfo(fakedPlugin, settings.getDefaultModel()); } // update provider, own name, title