diff --git a/plugins/channelrx/demodadsb/adsbdemod.cpp b/plugins/channelrx/demodadsb/adsbdemod.cpp index 96089730f..88d1ca1d1 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.cpp +++ b/plugins/channelrx/demodadsb/adsbdemod.cpp @@ -105,8 +105,8 @@ ADSBDemod::~ADSBDemod() delete m_networkManager; m_deviceAPI->removeChannelSinkAPI(this); m_deviceAPI->removeChannelSink(this); + delete m_basebandSink; // This results in a call to ADSBDemod::stop(), so need to delete before worker and thread delete m_worker; - delete m_basebandSink; delete m_thread; } diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index aab087585..9f54f4116 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -5113,6 +5113,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb ADSBDemodGUI::~ADSBDemodGUI() { + m_adsbDemod->setMessageQueueToGUI(nullptr); disconnect(&MainCore::instance()->getSettings(), &MainSettings::preferenceChanged, this, &ADSBDemodGUI::preferenceChanged); if (m_templateServer) {