]> git.sesse.net Git - vlc/commitdiff
prevent some more segfaults.
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 4 Feb 2006 22:34:40 +0000 (22:34 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 4 Feb 2006 22:34:40 +0000 (22:34 +0000)
zorglub: could you have a look ? this solution doesn't seem right to
me because we "loose" some of the calls to the interaction system if
they're sent at the wrong moment.

src/interface/interaction.c

index 2f0108bdc28425e3a5b6dfe6f562172fb2ed2844..f16fc1d4e3f4244243b4043046ae7602e3601073 100644 (file)
@@ -375,7 +375,8 @@ void __intf_UserProgressUpdate( vlc_object_t *p_this, int i_id,
     vlc_mutex_lock( &p_interaction->object_lock );
     p_dialog  =  intf_InteractionGetById( p_this, i_id );
 
-    if( !p_dialog || p_dialog->i_status == NEW_DIALOG )
+    if( !p_dialog || p_dialog->i_status == NEW_DIALOG
+                  || p_dialog->i_status == HIDING_DIALOG )
     {
         vlc_mutex_unlock( &p_interaction->object_lock ) ;
         return;
@@ -465,7 +466,8 @@ void __intf_UserHide( vlc_object_t *p_this, int i_id )
     vlc_mutex_lock( &p_interaction->object_lock );
     p_dialog  =  intf_InteractionGetById( p_this, i_id );
 
-    if( !p_dialog )
+    if( !p_dialog || p_dialog->i_status == NEW_DIALOG
+                  || p_dialog->i_status == HIDING_DIALOG )
     {
        vlc_mutex_unlock( &p_interaction->object_lock );
        return;