]> git.sesse.net Git - vlc/blobdiff - modules/access/dvdnav.c
Fixed a rare sent-msg-to-freed-object issue
[vlc] / modules / access / dvdnav.c
index be204f7249b20a3a2f5b79855d3c550e595d58fe..43f0c1112ad6a7e5431cf6b360e506e263cd6ec6 100644 (file)
@@ -1234,7 +1234,7 @@ static int EventThread( vlc_object_t *p_this )
     var_AddCallback( p_ev->p_libvlc, "key-action", EventKey, p_ev );
 
     /* main loop */
-    while( !p_ev->b_die )
+    while( vlc_object_alive (p_ev) )
     {
         bool b_activated = false;
 
@@ -1297,7 +1297,7 @@ static int EventThread( vlc_object_t *p_this )
             p_ev->b_clicked = false;
             vlc_mutex_unlock( &p_ev->lock );
         }
-        if( p_vout && p_vout->b_die )
+        if( p_vout && !vlc_object_alive (p_vout) )
         {
             var_DelCallback( p_vout, "mouse-moved", EventMouse, p_ev );
             var_DelCallback( p_vout, "mouse-clicked", EventMouse, p_ev );