Skip to content

Commit

Permalink
Fix modem re-connect crash
Browse files Browse the repository at this point in the history
  • Loading branch information
juribeparada committed Aug 20, 2018
1 parent f0ea25d commit 713d12e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Modem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 713d12e

Please sign in to comment.