aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPAppController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r--Source/SPAppController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 3458634a..35b5ab96 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -2193,6 +2193,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];