From 3bb4f48faf2aa1a80e4e96c4cdc5d05de942ffe2 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 26 Aug 2021 17:22:10 +0200 Subject: [PATCH] fix errors on shutdown (duplicate calls) --- owrx/fft.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/owrx/fft.py b/owrx/fft.py index e97c5a8..e1a8004 100644 --- a/owrx/fft.py +++ b/owrx/fft.py @@ -84,7 +84,11 @@ class SpectrumThread(SdrSourceEventClient): self.dsp.setReader(self.sdrSource.getBuffer().getReader()) def onFail(self): + if self.dsp is None: + return self.dsp.stop() def onShutdown(self): + if self.dsp is None: + return self.dsp.stop()