diff --git a/src/android/com/adobe/phonegap/fetch/FetchPlugin.java b/src/android/com/adobe/phonegap/fetch/FetchPlugin.java index 4820bfc..f8149e6 100644 --- a/src/android/com/adobe/phonegap/fetch/FetchPlugin.java +++ b/src/android/com/adobe/phonegap/fetch/FetchPlugin.java @@ -120,7 +120,7 @@ public void onResponse(Call call, Response response) throws IOException { result.put("headers", allHeaders); - if (response.body().contentType().type().equals("image")) { + if (response.body().contentType() != null && response.body().contentType().type().equals("image")) { result.put("isBlob", true); result.put("body", Base64.encodeToString(response.body().bytes(), Base64.DEFAULT)); } else {