From d7db3405a0de8b432f5631cd42db482ecb744837 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 24 Mar 2018 22:39:16 +0100 Subject: [PATCH] ThreadedBasebandSampleSource: destructor: call stop only if thread is running --- sdrbase/dsp/threadedbasebandsamplesource.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sdrbase/dsp/threadedbasebandsamplesource.cpp b/sdrbase/dsp/threadedbasebandsamplesource.cpp index d8fbf3c06..97d059234 100644 --- a/sdrbase/dsp/threadedbasebandsamplesource.cpp +++ b/sdrbase/dsp/threadedbasebandsamplesource.cpp @@ -36,7 +36,10 @@ ThreadedBasebandSampleSource::ThreadedBasebandSampleSource(BasebandSampleSource* ThreadedBasebandSampleSource::~ThreadedBasebandSampleSource() { - stop(); + if (m_thread->isRunning()) { + stop(); + } + delete m_thread; }