diff --git a/sdrbase/dsp/threadedbasebandsamplesink.cpp b/sdrbase/dsp/threadedbasebandsamplesink.cpp index 536b3e6cd..e646cd7cc 100644 --- a/sdrbase/dsp/threadedbasebandsamplesink.cpp +++ b/sdrbase/dsp/threadedbasebandsamplesink.cpp @@ -88,8 +88,11 @@ ThreadedBasebandSampleSink::ThreadedBasebandSampleSink(BasebandSampleSink* sampl ThreadedBasebandSampleSink::~ThreadedBasebandSampleSink() { - stop(); - delete m_threadedBasebandSampleSinkFifo; // Valgrind memcheck + if (m_thread->isRunning()) { + stop(); + } + + delete m_threadedBasebandSampleSinkFifo; // Valgrind memcheck delete m_thread; }