mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 15:09:23 +08:00
Fix modem re-connect crash
This commit is contained in:
@@ -230,11 +230,8 @@ bool CModem::open()
|
|||||||
::LogMessage("Opening the MMDVM");
|
::LogMessage("Opening the MMDVM");
|
||||||
|
|
||||||
bool ret = m_serial->open();
|
bool ret = m_serial->open();
|
||||||
if (!ret) {
|
if (!ret)
|
||||||
delete m_serial;
|
|
||||||
m_serial = NULL;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
ret = readVersion();
|
ret = readVersion();
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
@@ -756,8 +753,6 @@ void CModem::close()
|
|||||||
::LogMessage("Closing the MMDVM");
|
::LogMessage("Closing the MMDVM");
|
||||||
|
|
||||||
m_serial->close();
|
m_serial->close();
|
||||||
delete m_serial;
|
|
||||||
m_serial = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int CModem::readDStarData(unsigned char* data)
|
unsigned int CModem::readDStarData(unsigned char* data)
|
||||||
|
|||||||
Reference in New Issue
Block a user