From 9b23ab701533d50b0b69492361c0e6f4b8e4a549 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 30 Sep 2020 13:52:37 +0200 Subject: [PATCH] Only stop the loop if it is set --- platypush/common/gstreamer/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/common/gstreamer/__init__.py b/platypush/common/gstreamer/__init__.py index 39f4914c..05b9c9ed 100644 --- a/platypush/common/gstreamer/__init__.py +++ b/platypush/common/gstreamer/__init__.py @@ -77,7 +77,8 @@ class Pipeline: def stop(self): self.pipeline.set_state(Gst.State.NULL) - self.loop.stop() + if self.loop: + self.loop.stop() self.loop = None def get_volume(self) -> float: