Fix modem re-connect crash
This commit is contained in:
parent
f0ea25d954
commit
713d12e5a4
|
@ -230,11 +230,8 @@ bool CModem::open()
|
|||
::LogMessage("Opening the MMDVM");
|
||||
|
||||
bool ret = m_serial->open();
|
||||
if (!ret) {
|
||||
delete m_serial;
|
||||
m_serial = NULL;
|
||||
if (!ret)
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = readVersion();
|
||||
if (!ret) {
|
||||
|
@ -756,8 +753,6 @@ void CModem::close()
|
|||
::LogMessage("Closing the MMDVM");
|
||||
|
||||
m_serial->close();
|
||||
delete m_serial;
|
||||
m_serial = NULL;
|
||||
}
|
||||
|
||||
unsigned int CModem::readDStarData(unsigned char* data)
|
||||
|
|
Loading…
Reference in a new issue