aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-11-01 06:18:37 +0100
committerMax <post@wickenrode.com>2015-11-01 18:08:05 +0100
commitba4469e78d664751b4da2d2d62db16163e838208 (patch)
tree364383ec29c949232f22440532d360debe7277a7
parentd82dc7bbd87c29895910ae7ff7382d98687eba00 (diff)
downloadsequelpro-ba4469e78d664751b4da2d2d62db16163e838208.tar.gz
sequelpro-ba4469e78d664751b4da2d2d62db16163e838208.tar.bz2
sequelpro-ba4469e78d664751b4da2d2d62db16163e838208.zip
Fix an exception on 10.11 when trying to install an SP update while a save dialog is displayed (may have afftected other modal dialogs)
-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];