adium 3405:880024cc6758: Patch from a reliable anonymous source ...
commits at adium.im
commits at adium.im
Sat Oct 23 18:21:46 UTC 2010
details: http://hg.adium.im/adium/rev/880024cc6758
revision: 3405:880024cc6758
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.
diffs (17 lines):
diff -r 78cdb404537c -r 880024cc6758 Frameworks/Adium Framework/Source/AIXMLElement.m
--- a/Frameworks/Adium Framework/Source/AIXMLElement.m Sat Oct 23 13:46:21 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