ThreadedBasebandSampleSink: destructor: call stop only if thread is running

This commit is contained in:
f4exb 2018-03-24 22:37:36 +01:00
parent 408b80fa1d
commit 1156a1931f
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}