[vlc-commits] macosx: core dialogs: cancel modal loop on main thread

David Fuhrmann git at videolan.org
Mon Sep 18 15:30:14 CEST 2017


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Sep 18 13:13:38 2017 +0200| [43affbe74f7dd247cf0081ff31c301b2fec5b747] | committer: David Fuhrmann

macosx: core dialogs: cancel modal loop on main thread

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

 modules/gui/macosx/VLCCoreDialogProvider.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/VLCCoreDialogProvider.m b/modules/gui/macosx/VLCCoreDialogProvider.m
index 9df7fb0c3d..d2095d2048 100644
--- a/modules/gui/macosx/VLCCoreDialogProvider.m
+++ b/modules/gui/macosx/VLCCoreDialogProvider.m
@@ -126,7 +126,9 @@ static void cancelCallback(void *p_data,
                            vlc_dialog_id *p_id)
 {
     @autoreleasepool {
-        [NSApp stopModalWithCode: 0];
+        dispatch_async(dispatch_get_main_queue(), ^{
+            [NSApp stopModalWithCode: 0];
+        });
     }
 }
 



More information about the vlc-commits mailing list