adium-1.4 3127:a04fddfc715b: Patch from a reliable anonymous sou...

commits at adium.im commits at adium.im
Sun Oct 24 01:09:44 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/a04fddfc715b
revision:	3127:a04fddfc715b
author:		Evan Schoenberg
date:		Sat Oct 23 13:20:47 2010 -0500

Patch from a reliable anonymous source to log and return rather than assert if -[AIXMLElement addEscapedObject:] is passed nil.
(transplanted from 880024cc6758a6e91905fa892f7b47d27e75220d)

diffs (17 lines):

diff -r c6a273de6355 -r a04fddfc715b Frameworks/Adium Framework/Source/AIXMLElement.m
--- a/Frameworks/Adium Framework/Source/AIXMLElement.m	Sat Oct 23 13:34:43 2010 +0200
+++ b/Frameworks/Adium Framework/Source/AIXMLElement.m	Sat Oct 23 13:20:47 2010 -0500
@@ -197,8 +197,11 @@
 - (void)addEscapedObject:(id)obj
 {
 	//Warn but don't assert if null is added.  Adding nothing is a no-op, but we may want to investigate where this is happening further.
-	if (!obj) NSLog(@"Warning: Attempted to add (null) to %@", obj);
-
+	if (!obj) {
+		NSLog(@"Attempted to add null to AIXMLElement %@, backtrace available in debug mode", obj);
+		AILogWithBacktrace(@"Warning: Attempted to add (null) to AIXMLElement %@", obj);
+		return;
+	}
 	NSAssert2(([obj isKindOfClass:[NSString class]] || [obj isKindOfClass:[AIXMLElement class]]), @"%@: addObject: %@ is of incorrect class",self,obj);
 	
 	[contents addObject:obj];




More information about the commits mailing list