Skip to content

Commit

Permalink
Merge pull request #7301 from ashcoding/TIMOB-19579_5_1_X_fix
Browse files Browse the repository at this point in the history
[TIMOB-19722] [TIMOB-19579] (5_1_X) Android: Backport, fixes NullPointerException in TiConvert
  • Loading branch information
ashcoding committed Oct 14, 2015
2 parents 2214b33 + ebdeb9c commit deb49b6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ public static boolean toBoolean(Object value)
*/
public static boolean toBoolean(HashMap<String, Object> hashMap, String key, boolean def)
{
return toBoolean(hashMap.get(key), def);
if (hashMap != null && key != null){
return toBoolean(hashMap.get(key), def);
}

return def;
}

/**
Expand Down

0 comments on commit deb49b6

Please sign in to comment.