From 81de40de9de77bf0e924ace917000776e4bfb5f3 Mon Sep 17 00:00:00 2001 From: "stuart.morgan%alumni.case.edu" Date: Thu, 19 Apr 2007 04:40:14 +0000 Subject: [PATCH] Camino only - Bug 377980: Fix for crash on opening links via AppleEvents. Patch by Sean Murphy . r/sr=smorgan git-svn-id: svn://10.0.0.236/trunk@224723 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/camino/src/appleevents/GetURLCommand.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/camino/src/appleevents/GetURLCommand.mm b/mozilla/camino/src/appleevents/GetURLCommand.mm index d0fc021d0cf..dced618f5a8 100644 --- a/mozilla/camino/src/appleevents/GetURLCommand.mm +++ b/mozilla/camino/src/appleevents/GetURLCommand.mm @@ -69,6 +69,7 @@ static NSString* const kMainControllerIsInitializedKey = @"initialized"; - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if ([keyPath isEqualToString:kMainControllerIsInitializedKey] && [[change objectForKey:NSKeyValueChangeNewKey] boolValue]) { + [object removeObserver:self forKeyPath:kMainControllerIsInitializedKey]; // explicitly perform the command's default implementation again, // since |resumeExecutionWithResult:| will not. id result = [self executeCommand]; @@ -78,7 +79,6 @@ static NSString* const kMainControllerIsInitializedKey = @"initialized"; - (void)dealloc { - [[NSApp delegate] removeObserver:self forKeyPath:kMainControllerIsInitializedKey]; [super dealloc]; }