From e51b4897a34c8d4430ad8036cff86f7fd95747b8 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Thu, 8 Nov 2012 14:01:46 -0500 Subject: [PATCH] Guard against null mimeType in MediaFile.getFormatData --- framework/src/org/apache/cordova/Capture.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/Capture.java b/framework/src/org/apache/cordova/Capture.java index 4cf46dd5..3eecf379 100644 --- a/framework/src/org/apache/cordova/Capture.java +++ b/framework/src/org/apache/cordova/Capture.java @@ -127,7 +127,7 @@ public class Capture extends CordovaPlugin { // If the mimeType isn't set the rest will fail // so let's see if we can determine it. - if (mimeType == null || mimeType.equals("")) { + if (mimeType == null || mimeType.equals("") || "null".equals(mimeType)) { mimeType = FileUtils.getMimeType(filePath); } Log.d(LOG_TAG, "Mime type = " + mimeType);