Skip to content

Commit ff8ddca

Browse files
authored
Merge pull request #18 from OneSignal/no_tags_npe
Fix Android No Tags Null Pointer Exception
2 parents d33b258 + eee1262 commit ff8ddca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/src/main/java/com/onesignal/flutter/OneSignalSerializer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ static private HashMap<String, Object> convertAndroidBackgroundImageLayoutToMap(
199199
static public HashMap<String, Object> convertJSONObjectToHashMap(JSONObject object) throws JSONException {
200200
HashMap<String, Object> hash = new HashMap<>();
201201

202+
if (object == null)
203+
return hash;
204+
202205
Iterator<String> keys = object.keys();
203206

204207
while (keys.hasNext()) {

0 commit comments

Comments
 (0)