Camino only - Bug 377980: Fix for crash on opening links via AppleEvents. Patch by Sean Murphy <murph@seanmurph.com>. r/sr=smorgan

git-svn-id: svn://10.0.0.236/trunk@224723 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
stuart.morgan%alumni.case.edu
2007-04-19 04:40:14 +00:00
parent ad2e4815e1
commit 81de40de9d

View File

@@ -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];
}