1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-26 23:06:34 -04:00

Set channel message queue to null in channel before destroying its GUI. Fixes #769

This commit is contained in:
f4exb 2021-02-08 22:29:27 +01:00
parent b62cf26b22
commit f541b53454

View File

@ -165,7 +165,8 @@ void DeviceUISet::loadRxChannelSettings(const Preset *preset, PluginAPI *pluginA
{
qDebug("DeviceUISet::loadRxChannelSettings: destroying old channel [%s]",
qPrintable(m_channelInstanceRegistrations[i].m_channelAPI->getURI()));
m_channelInstanceRegistrations[i].m_gui->destroy(); // FIXME: stop channel before
m_channelInstanceRegistrations[i].m_channelAPI->setMessageQueueToGUI(nullptr); // have channel stop sending messages to its GUI
m_channelInstanceRegistrations[i].m_gui->destroy();
m_channelInstanceRegistrations[i].m_channelAPI->destroy();
}
@ -250,6 +251,7 @@ void DeviceUISet::loadTxChannelSettings(const Preset *preset, PluginAPI *pluginA
{
qDebug("DeviceUISet::loadTxChannelSettings: destroying old channel [%s]",
qPrintable(m_channelInstanceRegistrations[i].m_channelAPI->getURI()));
m_channelInstanceRegistrations[i].m_channelAPI->setMessageQueueToGUI(nullptr); // have channel stop sending messages to its GUI
m_channelInstanceRegistrations[i].m_gui->destroy();
m_channelInstanceRegistrations[i].m_channelAPI->destroy();
}