mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Do not create objects if there is no message queue to send to
Prevents memory leaks.
This commit is contained in:
parent
461a79439b
commit
3c0541d87a
@ -172,16 +172,16 @@ bool StarTracker::handleMessage(const Message& cmd)
|
||||
}
|
||||
else if (MainCore::MsgStarTrackerDisplaySettings::match(cmd))
|
||||
{
|
||||
MainCore::MsgStarTrackerDisplaySettings& settings = (MainCore::MsgStarTrackerDisplaySettings&) cmd;
|
||||
if (m_guiMessageQueue) {
|
||||
MainCore::MsgStarTrackerDisplaySettings& settings = (MainCore::MsgStarTrackerDisplaySettings&) cmd;
|
||||
m_guiMessageQueue->push(new MainCore::MsgStarTrackerDisplaySettings(settings));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgStarTrackerDisplayLoSSettings::match(cmd))
|
||||
{
|
||||
MainCore::MsgStarTrackerDisplayLoSSettings& settings = (MainCore::MsgStarTrackerDisplayLoSSettings&) cmd;
|
||||
if (m_guiMessageQueue) {
|
||||
MainCore::MsgStarTrackerDisplayLoSSettings& settings = (MainCore::MsgStarTrackerDisplayLoSSettings&) cmd;
|
||||
m_guiMessageQueue->push(new MainCore::MsgStarTrackerDisplayLoSSettings(settings));
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user