diff options
author | ritsuka <[email protected]> | 2015-01-07 07:11:00 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-01-07 07:11:00 +0000 |
commit | 19730b236b1be5975ea41a4b83ffe59ee75ca1f1 (patch) | |
tree | 4d91281223a0f4e44ba04cd5af9a80eda150dbc6 | |
parent | e9e3facee1ec8236547d23eb1e4bea11fa8b295c (diff) |
MacGui: create and run the error message alerts from libhb on the main thread.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6693 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/main.mm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/main.mm b/macosx/main.mm index 300000273..30ae392ae 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -9,16 +9,15 @@ static void hb_error_handler(const char *errmsg) { - @autoreleasepool - { + dispatch_async(dispatch_get_main_queue(), ^{ NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:NSLocalizedString(@"Internal Error.", @"")]; [alert setInformativeText:@(errmsg)]; [alert runModal]; [alert release]; + }); - fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg ); - } + fprintf(stderr, "GUI ERROR dialog: %s\n", errmsg ); } int main(int argc, const char **argv) |