kopia lustrzana https://gitlab.com/eliggett/wfview
Move nullptr check to modefilter
rodzic
c25040f793
commit
19f33d1ed7
15
wfmain.cpp
15
wfmain.cpp
|
@ -2233,11 +2233,6 @@ void wfmain::doCmd(commandtype cmddata)
|
|||
std::shared_ptr<void> data = cmddata.data;
|
||||
// This switch is for commands with parameters.
|
||||
// the "default" for non-parameter commands is to call doCmd(cmd).
|
||||
if (data == nullptr)
|
||||
{
|
||||
qInfo(logSystem()) << __PRETTY_FUNCTION__ << "WARNING: data is null";
|
||||
return;
|
||||
}
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
|
@ -2255,8 +2250,14 @@ void wfmain::doCmd(commandtype cmddata)
|
|||
}
|
||||
case cmdSetModeFilter:
|
||||
{
|
||||
mode_info m = (*std::static_pointer_cast<mode_info>(data));
|
||||
emit setMode(m);
|
||||
if (data == nullptr)
|
||||
{
|
||||
qInfo(logSystem()) << __PRETTY_FUNCTION__ << "WARNING: data is null";
|
||||
}
|
||||
else {
|
||||
mode_info m = (*std::static_pointer_cast<mode_info>(data));
|
||||
emit setMode(m);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case cmdSetTxPower:
|
||||
|
|
Ładowanie…
Reference in New Issue