From 213d9879554837bf233897fa54acc8b84b8877d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Veres-Szentkir=C3=A1lyi?= Date: Tue, 5 Nov 2013 21:28:42 +0100 Subject: [PATCH] avoid None dereference upon double AudioThread.stop() --- pysstv/examples/gimp-plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pysstv/examples/gimp-plugin.py b/pysstv/examples/gimp-plugin.py index 381b06c..5a8cb6e 100755 --- a/pysstv/examples/gimp-plugin.py +++ b/pysstv/examples/gimp-plugin.py @@ -29,8 +29,9 @@ class AudioThread(Thread): self.parent.audio_thread_ended() def stop(self): - self.pas.sampler = [] - self.pas = None + if self.pas is not None: + self.pas.sampler = [] + self.pas = None class Sine1750(SSTV):