From df991bb8a28ec8dd42d3ffcdcdc6cc0a6d1ce915 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 20 May 2019 21:30:48 +0200 Subject: fix app crash if backend returns null instead of valid json response --- app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/se') diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java index 113b07f5..78ded399 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java @@ -559,7 +559,7 @@ public abstract class ProviderApiManagerBase { try { responseJson = new JSONObject(plain_response); - } catch (JSONException e) { + } catch (NullPointerException | JSONException e) { e.printStackTrace(); responseJson = getErrorMessageAsJson(error_json_exception_user_message); } -- cgit v1.2.3