adium 3609:5b2e819a13f8: Fix a bug with nil objects in the AIHTH...

commits at adium.im commits at adium.im
Tue Dec 21 01:28:15 UTC 2010


details:	http://hg.adium.im/adium/rev/5b2e819a13f8
revision:	3609:5b2e819a13f8
author:		Thijs Alkemade <thijsalkemade at gmail.com>
date:		Tue Dec 21 02:24:26 2010 +0100

Fix a bug with nil objects in the AIHTHMLDecoder
(transplanted from ccb09f0e6c8c80b83273f3c5eeb0c1c99c2656e8)

diffs (19 lines):

diff -r 161b445cba8d -r 5b2e819a13f8 Frameworks/Adium Framework/Source/AIHTMLDecoder.m
--- a/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Tue Dec 21 00:54:40 2010 +0100
+++ b/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Tue Dec 21 02:24:26 2010 +0100
@@ -935,10 +935,12 @@
 					                                                  elementContent:nil
 					                             shouldAddElementContentToTopElement:NULL
 																		  imagesPath:imagesSavePath];
-					[[elementStack lastObject] addObject:restoreElement];
-					[elementStack addObject:restoreElement];
+					if (restoreElement) {
+						[[elementStack lastObject] addObject:restoreElement];
+						[elementStack addObject:restoreElement];
 
-					[attributeNamesStack addObject:attributesToRestore];
+						[attributeNamesStack addObject:attributesToRestore];
+					}
 				}
 			}
 




More information about the commits mailing list