summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-05-20 21:30:48 +0200
committercyBerta <cyberta@riseup.net>2019-05-20 21:30:48 +0200
commitdf991bb8a28ec8dd42d3ffcdcdc6cc0a6d1ce915 (patch)
tree932854a2713a8016a32ed358803a904ef935e553
parent20206e5661ed3f786ed8b9bcaf1941be9b92a596 (diff)
fix app crash if backend returns null instead of valid json response
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java2
1 files changed, 1 insertions, 1 deletions
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);
}