From d82e3051bf889a1e23b6f4b40d70bb97cd724c3b Mon Sep 17 00:00:00 2001 From: f4exb Date: Fri, 4 Oct 2024 20:50:36 +0200 Subject: [PATCH] Frequency Scanner: initialize pointer to FrequencyScanner. Fixes #2262 --- plugins/channelrx/freqscanner/freqscanner.cpp | 2 +- plugins/channelrx/freqscanner/freqscannerbaseband.cpp | 3 ++- plugins/channelrx/freqscanner/freqscannerbaseband.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/channelrx/freqscanner/freqscanner.cpp b/plugins/channelrx/freqscanner/freqscanner.cpp index 48708d72a..e5d62b59f 100644 --- a/plugins/channelrx/freqscanner/freqscanner.cpp +++ b/plugins/channelrx/freqscanner/freqscanner.cpp @@ -153,7 +153,7 @@ void FreqScanner::start() qDebug("FreqScanner::start"); m_thread = new QThread(); - m_basebandSink = new FreqScannerBaseband(); + m_basebandSink = new FreqScannerBaseband(this); m_basebandSink->setFifoLabel(QString("%1 [%2:%3]") .arg(m_channelId) .arg(m_deviceAPI->getDeviceSetIndex()) diff --git a/plugins/channelrx/freqscanner/freqscannerbaseband.cpp b/plugins/channelrx/freqscanner/freqscannerbaseband.cpp index 4fd211e2b..dcc71f637 100644 --- a/plugins/channelrx/freqscanner/freqscannerbaseband.cpp +++ b/plugins/channelrx/freqscanner/freqscannerbaseband.cpp @@ -27,7 +27,8 @@ MESSAGE_CLASS_DEFINITION(FreqScannerBaseband::MsgConfigureFreqScannerBaseband, Message) -FreqScannerBaseband::FreqScannerBaseband() : +FreqScannerBaseband::FreqScannerBaseband(FreqScanner *freqScanner) : + m_freqScanner(freqScanner), m_messageQueueToGUI(nullptr) { qDebug("FreqScannerBaseband::FreqScannerBaseband"); diff --git a/plugins/channelrx/freqscanner/freqscannerbaseband.h b/plugins/channelrx/freqscanner/freqscannerbaseband.h index 5a832ff41..2fcdc2d7a 100644 --- a/plugins/channelrx/freqscanner/freqscannerbaseband.h +++ b/plugins/channelrx/freqscanner/freqscannerbaseband.h @@ -63,7 +63,7 @@ public: { } }; - FreqScannerBaseband(); + FreqScannerBaseband(FreqScanner *freqScanner); ~FreqScannerBaseband(); void reset(); void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);