diff --git a/ChangeLog b/ChangeLog
index cc6abfdcf..199af3821 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* Source/NSWorkspace.m: In GSLaunched() be more defensive and don't
assume that the values which should be present in the notification
userinfo dictionry really are there.
+ * Source/NSApplication.m: Code more defensively setting up
+ notification info.
2006-02-02 Richard Frith-Macdonald
See Also: -applicationIconImage
- (NSDictionary*) _notificationUserInfo { + NSString *path; + NSString *port; NSNumber *processIdentifier; NSDictionary *userInfo; processIdentifier = [NSNumber numberWithInt: [[NSProcessInfo processInfo] processIdentifier]]; - userInfo = [NSDictionary dictionaryWithObjectsAndKeys: - [(GSServicesManager*)_listener port], @"NSApplicationName", - [[NSBundle mainBundle] bundlePath], @"NSApplicationPath", - processIdentifier, @"NSApplicationProcessIdentifier", - nil]; + port = [(GSServicesManager*)_listener port]; + path = [[NSBundle mainBundle] bundlePath]; + if (port == nil) + { + if (path == nil) + { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + processIdentifier, @"NSApplicationProcessIdentifier", + nil]; + } + else + { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + path, @"NSApplicationPath", + processIdentifier, @"NSApplicationProcessIdentifier", + nil]; + } + } + else if (path == nil) + { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + port, @"NSApplicationName", + processIdentifier, @"NSApplicationProcessIdentifier", + nil]; + } + else + { + userInfo = [NSDictionary dictionaryWithObjectsAndKeys: + port, @"NSApplicationName", + path, @"NSApplicationPath", + processIdentifier, @"NSApplicationProcessIdentifier", + nil]; + } return userInfo; }