Revision: 22630
          http://sourceforge.net/p/bibdesk/svn/22630
Author:   hofman
Date:     2018-09-18 15:12:06 +0000 (Tue, 18 Sep 2018)
Log Message:
-----------
check for null value in add and remove script commands

Modified Paths:
--------------
    trunk/bibdesk/BDSKAddCommand.m
    trunk/bibdesk/BDSKRemoveCommand.m

Modified: trunk/bibdesk/BDSKAddCommand.m
===================================================================
--- trunk/bibdesk/BDSKAddCommand.m      2018-09-18 12:29:37 UTC (rev 22629)
+++ trunk/bibdesk/BDSKAddCommand.m      2018-09-18 15:12:06 UTC (rev 22630)
@@ -57,6 +57,8 @@
         ([insertionObjects isKindOfClass:[NSArray class]] &&
          NSNotFound == [insertionObjects indexOfObjectPassingTest:^BOOL(id 
obj, NSUInteger idx, BOOL *stop){ return NO == [obj 
respondsToSelector:@selector(objectsByEvaluatingSpecifier)]; }])) {
         insertionObjects = [insertionObjects 
valueForKey:@"objectsByEvaluatingSpecifier"];
+        if ([insertionObjects isKindOfClass:[NSArray class]] && 
[insertionObjects containsObject:[NSNull null]])
+            insertionObjects = nil;
     }
     
     if (insertionObjects == nil) {

Modified: trunk/bibdesk/BDSKRemoveCommand.m
===================================================================
--- trunk/bibdesk/BDSKRemoveCommand.m   2018-09-18 12:29:37 UTC (rev 22629)
+++ trunk/bibdesk/BDSKRemoveCommand.m   2018-09-18 15:12:06 UTC (rev 22630)
@@ -56,6 +56,8 @@
         ([removeObjects isKindOfClass:[NSArray class]] &&
          NSNotFound == [removeObjects indexOfObjectPassingTest:^BOOL(id obj, 
NSUInteger idx, BOOL *stop){ return NO == [obj 
respondsToSelector:@selector(objectsByEvaluatingSpecifier)]; }])) {
             removeObjects = [removeObjects 
valueForKey:@"objectsByEvaluatingSpecifier"];
+        if ([removeObjects isKindOfClass:[NSArray class]] && [removeObjects 
containsObject:[NSNull null]])
+            removeObjects = nil;
     }
     
     if (removeObjects == nil) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to