diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index 9f2e4b928..836f2afc4 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -140,6 +140,8 @@ namespace BlackCore { disconnect(m_validator); m_validator->quitAndWait(); + m_validator->deleteLater(); + m_validator = nullptr; } this->disconnect(); this->unloadSimulatorPlugin(); @@ -147,6 +149,7 @@ namespace BlackCore CSimulatorPluginInfoList CContextSimulator::getAvailableSimulatorPlugins() const { + if (!m_plugins) { return {}; } return m_plugins->getAvailableSimulatorPlugins(); }