File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
WordPress/src/main/java/org/wordpress/android/ui/prefs Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -908,6 +908,10 @@ private JSONObject serializeWpComParamsToJSONObject() throws JSONException {
908908 private void deserializeJetpackRestResponse (SiteModel site , JSONObject response ) {
909909 if (site == null || response == null ) return ;
910910 JSONObject settingsObject = response .optJSONObject ("settings" );
911+ if (settingsObject == null ) {
912+ AppLog .e (AppLog .T .API , "Error: response doesn't contain settings object" );
913+ return ;
914+ }
911915 mRemoteJpSettings .emailNotifications = settingsObject .optBoolean (JP_MONITOR_EMAIL_NOTES_KEY , false );
912916 mRemoteJpSettings .wpNotifications = settingsObject .optBoolean (JP_MONITOR_WP_NOTES_KEY , false );
913917 }
You can’t perform that action at this time.
0 commit comments