diff options
Diffstat (limited to 'Transceiver52M')
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 2d5c04e..e946aac 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -151,9 +151,11 @@ Transceiver::~Transceiver() close(mClockSocket); for (size_t i = 0; i < mChans; i++) { - mControlServiceLoopThreads[i]->cancel(); - mControlServiceLoopThreads[i]->join(); - delete mControlServiceLoopThreads[i]; + if (mControlServiceLoopThreads[i]) { + mControlServiceLoopThreads[i]->cancel(); + mControlServiceLoopThreads[i]->join(); + delete mControlServiceLoopThreads[i]; + } mTxPriorityQueues[i].clear(); if (mCtrlSockets[i] >= 0) |