adium-1.4 2705:da02036bbb7a: Prevent attempting to set a nil pro...
commits at adium.im
commits at adium.im
Sat Oct 31 17:17:08 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/da02036bbb7a
revision: 2705:da02036bbb7a
author: Evan Schoenberg
date: Sat Oct 31 12:18:11 2009 -0500
Prevent attempting to set a nil property on an AWEzvXMLNode. This turns a crash into a warning.
One such case could occur, and seems to have at least once for one user in #11799, if AWEzvContactManager's myInstanceName is nil. This needs further investigation.
Fixes #11799
diffs (18 lines):
diff -r f3723dc7c70a -r da02036bbb7a Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m Sat Oct 31 13:14:00 2009 -0400
+++ b/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m Sat Oct 31 12:18:11 2009 -0500
@@ -73,7 +73,13 @@
}
- (void) addAttribute:(NSString *)property withValue:(NSString *)value {
- [attributes setObject:value forKey:property];
+ if (value && property)
+ [attributes setObject:value forKey:property];
+ else {
+ NSLog(@"WARNING: %@ attempted to set %@ for %@", self, value, propery);
+ AILogWithSignature(@"WARNING: %@ attempted to set %@ for %@", self, value, propery);
+ }
+
}
- (NSString *)name {
More information about the commits
mailing list