diff --git a/framework/src/com/phonegap/ContactAccessor.java b/framework/src/com/phonegap/ContactAccessor.java index 1cc49644..fdbb996f 100644 --- a/framework/src/com/phonegap/ContactAccessor.java +++ b/framework/src/com/phonegap/ContactAccessor.java @@ -178,11 +178,13 @@ public abstract class ContactAccessor { protected String getJsonString(JSONObject obj, String property) { String value = null; try { + if (obj != null) { value = obj.getString(property); - if (value.equals("null")) { - Log.d(LOG_TAG, property + " is string called 'null'"); - value = null; - } + if (value.equals("null")) { + Log.d(LOG_TAG, property + " is string called 'null'"); + value = null; + } + } } catch (JSONException e) { Log.d(LOG_TAG, "Could not get = " + e.getMessage()); diff --git a/framework/src/com/phonegap/ContactAccessorSdk5.java b/framework/src/com/phonegap/ContactAccessorSdk5.java index a1e7d428..e8b34ae8 100644 --- a/framework/src/com/phonegap/ContactAccessorSdk5.java +++ b/framework/src/com/phonegap/ContactAccessorSdk5.java @@ -1420,7 +1420,6 @@ public class ContactAccessorSdk5 extends ContactAccessor { .build()); } - // Add urls JSONArray websites = null; try { @@ -1473,7 +1472,6 @@ public class ContactAccessorSdk5 extends ContactAccessor { Log.e(LOG_TAG, e.getMessage(), e); retVal = false; } - return retVal; }