]> git.sesse.net Git - vlc/commitdiff
gui/macosx/interaction.m: Don't destroy twice the window.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 24 Feb 2008 12:48:03 +0000 (12:48 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sun, 24 Feb 2008 12:48:03 +0000 (12:48 +0000)
modules/gui/macosx/interaction.m

index 1d5f7170f5b29a462e08deea69df79f075c469d0..d190e3ebee0e42bfd5853c38becfe60130d5a48d 100644 (file)
 
 -(void)hideDialog
 {
-    msg_Dbg( p_intf, "hide event" );
+    msg_Dbg( p_intf, "hide event %p", self );
     if( p_dialog->i_flags & DIALOG_USER_PROGRESS )
     {
-        [NSApp endSheet: o_prog_win];
-        [o_prog_win close];
+        if(![o_prog_win isVisible])
+        {
+            [NSApp endSheet: o_prog_win];
+            [o_prog_win close];
+        }
     }
     if( p_dialog->i_flags & DIALOG_LOGIN_PW_OK_CANCEL )
     {
-        [NSApp endSheet: o_auth_win];
-        [o_auth_win close];
+        if(![o_auth_win isVisible])
+        {
+            [NSApp endSheet: o_auth_win];
+            [o_auth_win close];
+        }
     }
     if( p_dialog->i_flags & DIALOG_PSZ_INPUT_OK_CANCEL )
     {
-        [NSApp endSheet: o_input_win];
-        [o_input_win close];
+        if(![o_input_win isVisible])
+        {
+            [NSApp endSheet: o_input_win];
+            [o_input_win close];
+        }
     }
     if( p_dialog->i_flags & DIALOG_INTF_PROGRESS )
     {