Skip to content

Commit

Permalink
Guard against null mimeType in MediaFile.getFormatData
Browse files Browse the repository at this point in the history
  • Loading branch information
macdonst committed Nov 8, 2012
1 parent 81f283e commit e51b489
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/src/org/apache/cordova/Capture.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private JSONObject getFormatData(String filePath, String mimeType) throws JSONEx

// 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);
Expand Down

0 comments on commit e51b489

Please sign in to comment.