mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
1 parent
2a0514c93b
commit
57731f44d7
1 file changed
+7
-2
Vendored
+7
-2
@@ -304,7 +304,7 @@
|
||||
|
||||
- (void)abortUpdateWithError:(NSError *)error
|
||||
{
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
void (^callback)() = ^{
|
||||
if (self.showErrors) {
|
||||
NSAlert *alert = [[NSAlert alloc] init];
|
||||
alert.messageText = SULocalizedString(@"Update Error!", nil);
|
||||
@@ -313,7 +313,12 @@
|
||||
[self showAlert:alert];
|
||||
}
|
||||
[super abortUpdateWithError:error];
|
||||
});
|
||||
};
|
||||
if ([NSThread isMainThread]) {
|
||||
callback();
|
||||
} else {
|
||||
dispatch_sync(dispatch_get_main_queue(), callback);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)abortUpdate
|
||||
|
||||
Reference in new issue
Block a user