adium 2829:fa28661f40dd: Prevent attempting to set a nil propert...
    commits at adium.im 
    commits at adium.im
       
    Sat Oct 31 17:15:09 UTC 2009
    
    
  
details:	http://hg.adium.im/adium/rev/fa28661f40dd
revision:	2829:fa28661f40dd
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 2d4b22009aff -r fa28661f40dd Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m
--- a/Plugins/Bonjour/libezv/Private Classes/AWEzvXMLNode.m	Sat Oct 31 12:18:25 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