adium 3568:1cd209516587: Just like in the patch from our anonymo...
commits at adium.im
commits at adium.im
Wed Nov 24 18:30:16 UTC 2010
details: http://hg.adium.im/adium/rev/1cd209516587
revision: 3568:1cd209516587
author: Thijs Alkemade <thijsalkemade at gmail.com>
date: Wed Nov 24 19:28:21 2010 +0100
Just like in the patch from our anonymous source, log a lot but don't assert when adding nil via addObject:.
Refs #14229.
diffs (16 lines):
diff -r ce55c3af60c4 -r 1cd209516587 Frameworks/Adium Framework/Source/AIXMLElement.m
--- a/Frameworks/Adium Framework/Source/AIXMLElement.m Mon Nov 22 11:30:16 2010 -0800
+++ b/Frameworks/Adium Framework/Source/AIXMLElement.m Wed Nov 24 19:28:21 2010 +0100
@@ -219,7 +219,11 @@
- (void)addObject:(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) {
+ AILog(@"Attempted to add null to AIXMLElement %@, backtrace available in debug mode", obj);
+ AILogBacktrace();
+ return;
+ }
BOOL isString = [obj isKindOfClass:[NSString class]];
NSAssert2((isString || [obj isKindOfClass:[AIXMLElement class]]), @"%@: addObject: %@ is of incorrect class",self,obj);
More information about the commits
mailing list