From 0c307bc606880638f2260a63da412396d1de5054 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Mon, 9 Nov 2020 21:45:59 +0100 Subject: [PATCH] Ignore state change signals during app exit --- clapper_src/player.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/clapper_src/player.js b/clapper_src/player.js index 8237e94a..ef3896b0 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -309,10 +309,14 @@ class ClapperPlayer extends PlayerBase { this.state = state; - if(this.quitOnStop && state === GstPlayer.PlayerState.STOPPED) { - let root = player.widget.get_root(); + if(this.quitOnStop) { + if(state === GstPlayer.PlayerState.STOPPED) { + let root = player.widget.get_root(); + if(root) + root.run_dispose(); + } - return root.run_dispose(); + return; } let clapperWidget = player.widget.get_ancestor(Gtk.Grid);