From ba4469e78d664751b4da2d2d62db16163e838208 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 1 Nov 2015 06:18:37 +0100 Subject: 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) --- Source/SPAppController.m | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source') 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]; -- cgit v1.2.3