]> git.sesse.net Git - vlc/commitdiff
bluray: fix abort() when empty overlay is closed
authorPetri Hintukainen <phintuka@users.sourceforge.net>
Wed, 12 Feb 2014 20:37:49 +0000 (22:37 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 13 Feb 2014 11:58:48 +0000 (12:58 +0100)
HDMV titles can construct empty overlay with invisible buttons to enable navigation.
This is used in ex. photo galleries (to flip image) and with audio navigation ("spoken menu").

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/access/bluray.c

index bc4c8e9a1b115973f9d18ddf043c96fc8dd59029..1d34060bacb20a8c50e820c278c583e6056c68ce 100644 (file)
@@ -791,10 +791,12 @@ static void blurayCloseOverlay(demux_t *p_demux, int plane)
             return;
 
     /* All overlays have been closed */
-    var_DelCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux);
-    var_DelCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux);
-    vlc_object_release(p_sys->p_vout);
-    p_sys->p_vout = NULL;
+    if (p_sys->p_vout != NULL) {
+        var_DelCallback(p_sys->p_vout, "mouse-moved", onMouseEvent, p_demux);
+        var_DelCallback(p_sys->p_vout, "mouse-clicked", onMouseEvent, p_demux);
+        vlc_object_release(p_sys->p_vout);
+        p_sys->p_vout = NULL;
+    }
 }
 
 /*