aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPAppController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 6489a76a..85deca6e 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -2136,6 +2136,9 @@
*/
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater
{
+ // Sparkle might call this on a background thread, but calling endSheet: from a bg thread is unhealthy
+ if(![NSThread isMainThread]) return [[self onMainThread] updaterWillRelaunchApplication:updater];
+
// Get all the currently open windows and their attached sheets if any
NSArray *windows = [NSApp windows];