Index: base/android/content_uri_utils.cc |
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc |
index 195598bfb3fd29dd03137bab7478aba8d750ed2c..31f7b4fffbf050f1500618bf7145a5285a09d45e 100644 |
--- a/base/android/content_uri_utils.cc |
+++ b/base/android/content_uri_utils.cc |
@@ -43,6 +43,9 @@ std::string GetContentUriMimeType(const FilePath& content_uri) { |
ScopedJavaLocalRef<jstring> j_mime = |
Java_ContentUriUtils_getMimeType( |
env, base::android::GetApplicationContext(), j_uri.obj()); |
+ if (j_mime.is_null()) |
+ return std::string(); |
+ |
return base::android::ConvertJavaStringToUTF8(env, j_mime.obj()); |
} |