adium-1.4 2800:728b4e994ca2: Avoid asking for a non-existent key...

commits at adium.im commits at adium.im
Mon Nov 23 06:25:40 UTC 2009


details:	http://hg.adium.im/adium-1.4/rev/728b4e994ca2
revision:	2800:728b4e994ca2
author:		Zachary West <zacw at adium.im>
date:		Mon Nov 23 01:23:37 2009 -0500

Avoid asking for a non-existent key when dragging contacts into things.

diffs (20 lines):

diff -r ba94093fbed8 -r 728b4e994ca2 Frameworks/Adium Framework/Source/AIAbstractListController.m
--- a/Frameworks/Adium Framework/Source/AIAbstractListController.m	Mon Nov 23 00:46:43 2009 -0500
+++ b/Frameworks/Adium Framework/Source/AIAbstractListController.m	Mon Nov 23 01:23:37 2009 -0500
@@ -904,8 +904,14 @@
 {
 	//Provide an array of internalObjectIDs which can be used to reference all the dragged contacts
 	if ([type isEqualToString:@"AIListObjectUniqueIDs"]) {
-		if (dragItems)
-			 [sender setPropertyList:[dragItems valueForKey:@"internalObjectID"] forType:@"AIListObjectUniqueIDs"];
+		if (dragItems) {
+			NSMutableArray *array = [NSMutableArray array];
+			for (AIListObject *listObject in dragItems) {
+				[array addObject:listObject.internalObjectID];
+			}
+			
+			[sender setPropertyList:array forType:@"AIListObjectUniqueIDs"];
+		}
 	}
 }
 




More information about the commits mailing list