cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an-s...@apache.org
Subject cordova-plugin-contacts git commit: CB-7906 Prevent app crash when desiredFields option has undefined items
Date Tue, 24 Nov 2015 07:45:19 GMT
Repository: cordova-plugin-contacts
Updated Branches:
  refs/heads/master b6fb48266 -> deda3d83b


CB-7906 Prevent app crash when desiredFields option has undefined items


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/commit/deda3d83
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/tree/deda3d83
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/diff/deda3d83

Branch: refs/heads/master
Commit: deda3d83b24f3ae4fd004ee7f75f7b95ab0ca354
Parents: b6fb482
Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
Authored: Sat Nov 21 16:02:53 2015 +0300
Committer: Vladimir Kotikov <v-vlkoti@microsoft.com>
Committed: Sat Nov 21 16:03:27 2015 +0300

----------------------------------------------------------------------
 src/ios/CDVContact.m | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-contacts/blob/deda3d83/src/ios/CDVContact.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVContact.m b/src/ios/CDVContact.m
index 6af9287..8a91ca6 100644
--- a/src/ios/CDVContact.m
+++ b/src/ios/CDVContact.m
@@ -1377,6 +1377,10 @@ static NSDictionary* org_apache_cordova_contacts_defaultFields = nil;
         }
 
         for (id i in fieldsArray) {
+
+            // CB-7906 ignore NULL desired fields to avoid fatal exception
+            if ([i isKindOfClass:[NSNull class]]) continue;
+
             NSMutableArray* keys = nil;
             NSString* fieldStr = nil;
             if ([i isKindOfClass:[NSNumber class]]) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message