Prevent some possible segfault errors (patch by Mike W9MDB).

This commit is contained in:
Uwe Risse
2022-11-01 16:40:08 +01:00
parent bc8ee62900
commit 0cd2935b8c
2 changed files with 13 additions and 3 deletions
@@ -444,8 +444,12 @@ QString DXLabSuiteCommanderTransceiver::command_with_reply (QString const& cmd)
// qDebug () << i << ":" << hex << int (result[i]);
// }
if (result != NULL)
{
CAT_TRACE (cmd << " -> " << QString {result});
return result; // converting raw UTF-8 bytes to QString
}
return "";
}
bool DXLabSuiteCommanderTransceiver::write_to_port (QString const& s)