From 713d12e5a4e0455ba1d2e9a7b9d9b54249c8bd05 Mon Sep 17 00:00:00 2001 From: Andy CA6JAU Date: Mon, 20 Aug 2018 00:12:38 -0300 Subject: [PATCH] Fix modem re-connect crash --- Modem.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Modem.cpp b/Modem.cpp index e15ae7a1a..f7c4588a3 100644 --- a/Modem.cpp +++ b/Modem.cpp @@ -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)