[vlc-commits] macosx: fix crash occuring while initializing the info panel
David Fuhrmann
git at videolan.org
Sat Apr 11 20:48:35 CEST 2015
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Apr 11 20:44:50 2015 +0200| [d87928927015fad3cdbcd0309bf3185c3672822f] | committer: David Fuhrmann
macosx: fix crash occuring while initializing the info panel
It is not allowed to call [[VLCMain sharedInstance] info]
on the non-main-thread, as this might load and initialize the
info window.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d87928927015fad3cdbcd0309bf3185c3672822f
---
modules/gui/macosx/intf.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 44ca67b..e175a0f 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -371,7 +371,9 @@ static int InputEvent(vlc_object_t *p_this, const char *psz_var,
[[VLCMain sharedInstance] performSelectorOnMainThread:@selector(updateMainWindow) withObject: nil waitUntilDone: NO];
break;
case INPUT_EVENT_STATISTICS:
- [[[VLCMain sharedInstance] info] performSelectorOnMainThread:@selector(updateStatistics) withObject: nil waitUntilDone: NO];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [[[VLCMain sharedInstance] info] updateStatistics];
+ });
break;
case INPUT_EVENT_ES:
break;
More information about the vlc-commits
mailing list