From c3ffd7f73946353880550bc1169a8fd9659c6312 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 19 Feb 2016 09:38:42 -0500 Subject: [PATCH] Don't register for termination notifications more than once. Fixes #757 These notifications are already added by -unarchiverDidFinish: which is always invoked before -showUpdateAlert --- Sparkle/SUAutomaticUpdateDriver.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index b4f2b78a..6727d0d9 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -156,8 +156,6 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2 case SUInstallLaterChoice: self.postponingInstallation = YES; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil]; - [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self selector:@selector(systemWillPowerOff:) name:NSWorkspaceWillPowerOffNotification object:nil]; // We're already waiting on quit, just indicate that we're idle. self.interruptible = YES; break; @@ -169,6 +167,7 @@ static const NSTimeInterval SUAutomaticUpdatePromptImpatienceTimer = 60 * 60 * 2 } } + - (void)installWithToolAndRelaunch:(BOOL)relaunch displayingUserInterface:(BOOL)showUI { if (relaunch) {