[vlc-commits] macosx: fixed a crash

Felix Paul Kühne git at videolan.org
Thu Mar 1 19:02:05 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Mar  1 19:00:16 2012 +0100| [aff835014cd769596220b56248fecda8bf196f29] | committer: Felix Paul Kühne

macosx: fixed a crash

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aff835014cd769596220b56248fecda8bf196f29
---

 modules/gui/macosx/coredialogs.m |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/gui/macosx/coredialogs.m b/modules/gui/macosx/coredialogs.m
index dcda482..9bb043f 100644
--- a/modules/gui/macosx/coredialogs.m
+++ b/modules/gui/macosx/coredialogs.m
@@ -165,6 +165,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
 {
     /* we work-around a Cocoa limitation here, since you cannot delay an execution
      * on the main thread within a single call */
+    b_progress_cancelled = NO;
     if (VLCIntf)
         [self performSelector:@selector(showProgressDialog:) withObject: o_value afterDelay:3.00];
 }
@@ -173,7 +174,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
 {
     dialog_progress_bar_t *p_dialog = [o_value pointerValue];
 
-    if (!p_dialog)
+    if (!p_dialog || b_progress_cancelled)
         return;
 
     if( p_dialog->title != NULL )
@@ -211,6 +212,7 @@ static VLCCoreDialogProvider *_o_sharedInstance = nil;
 
 -(void)destroyProgressPanel
 {
+    b_progress_cancelled = YES;
     [o_prog_bar stopAnimation: self];
     [o_prog_win close];
 }



More information about the vlc-commits mailing list