Commit 76501abf authored by Daniel Brötzmann's avatar Daniel Brötzmann

Preferences: Check for pipeline before removing elements

Fixes #10430
parent 1692f3ed
Pipeline #7278 passed with stages
in 7 minutes and 11 seconds
......@@ -98,12 +98,14 @@ def _enable_preview(self):
def _disable_preview(self):
if self._av_pipeline is not None:
self._av_pipeline.set_state(Gst.State.NULL)
if self._av_src is not None:
self._av_pipeline.remove(self._av_src)
self._av_src = None
if self._av_sink is not None:
self._av_pipeline.remove(self._av_sink)
self._av_sink = None
if self._av_src is not None:
self._av_pipeline.remove(self._av_src)
if self._av_sink is not None:
self._av_pipeline.remove(self._av_sink)
self._av_src = None
self._av_sink = None
if self._av_widget is not None:
self._ui.video_preview_box.remove(self._av_widget)
self._ui.video_preview_placeholder.set_visible(True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment