Only stop the loop if it is set

This commit is contained in:
Fabio Manganiello 2020-09-30 13:52:37 +02:00
parent 7947c1031d
commit 9b23ab7015

View file

@ -77,7 +77,8 @@ class Pipeline:
def stop(self): def stop(self):
self.pipeline.set_state(Gst.State.NULL) self.pipeline.set_state(Gst.State.NULL)
self.loop.stop() if self.loop:
self.loop.stop()
self.loop = None self.loop = None
def get_volume(self) -> float: def get_volume(self) -> float: