From d9e791216289cb696afd52566e00dfcd0c015c7f Mon Sep 17 00:00:00 2001 From: Kjell Nilsson Date: Tue, 26 Mar 2013 11:10:50 +0100 Subject: [PATCH] Fixed: constructing a 'RowCountChanged' notification generates a nil warning when dragging a row Previously, when - Dragging a row in the rule editor would eventually try to generate a dictionary with key 'indexes' and a nil value in the method __postRowCountChangedNotificationOfType:indexes:. Generating an empty dictionary instead when there is no indexes solves this issue. --- AppKit/CPRuleEditor/CPRuleEditor.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index 50e2905b8..738af0e2d 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -2279,7 +2279,7 @@ TODO: implement - (void)_postRowCountChangedNotificationOfType:(CPString)notificationName indexes:indexes { - var userInfo = @{ "indexes": indexes }; + var userInfo = indexes === nil ? @{} : @{ "indexes": indexes }; [[CPNotificationCenter defaultCenter] postNotificationName:notificationName object:self userInfo:userInfo]; }