From ebca762ea86ceb22dcee8cd0f17f7db19f225359 Mon Sep 17 00:00:00 2001 From: vsonnier Date: Fri, 25 Aug 2017 18:52:33 +0200 Subject: [PATCH] Fix crash introduced with #559, fix hanging thread at application termination --- src/AppFrame.cpp | 2 +- src/process/FFTVisualDataThread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index ec6bc3f..56e4376 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1700,7 +1700,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) { } //Refresh the current TX antenna on, if any: - if (devInfo) { + if ((antennaMenuItems.find(wxID_ANTENNA_CURRENT_TX) != antennaMenuItems.end()) && devInfo) { std::string actualTxAntenna = devInfo->getAntennaName(SOAPY_SDR_TX, 0); if (currentTXantennaName != actualTxAntenna) { diff --git a/src/process/FFTVisualDataThread.cpp b/src/process/FFTVisualDataThread.cpp index 8a3d2e3..e302c1b 100644 --- a/src/process/FFTVisualDataThread.cpp +++ b/src/process/FFTVisualDataThread.cpp @@ -73,7 +73,7 @@ void FFTVisualDataThread::run() { fftDistrib.run(); // Make wproc do a FFT of each of the sample sets provided by fftDistrib: - while (!wproc.isInputEmpty()) { + while (!stopping && !wproc.isInputEmpty()) { wproc.run(); } }