Bug 763200 - Fix another NPE in handleActivityResult. r=blassey
authorKartikaya Gupta <kgupta@mozilla.com>
Sat, 09 Jun 2012 14:16:14 -0400
changeset 101074 9c11efe876627c626265704712b5c51e0ff26519
parent 101073 c3b1df7ffdab612eda76eec9d9ef80740c65b174
child 101075 f547fbac08ed983dde9618889de8ff8654d64ad9
push id1316
push userakeybl@mozilla.com
push dateMon, 27 Aug 2012 22:37:00 +0000
treeherdermozilla-beta@db4b09302ee2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs763200
milestone16.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 763200 - Fix another NPE in handleActivityResult. r=blassey
mobile/android/base/GeckoApp.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -2994,16 +2994,18 @@ abstract public class GeckoApp
             super.onActivityResult(requestCode, resultCode, data);
     }
 
     static abstract class FilePickerResultHandler implements ActivityResultHandler {
         String handleActivityResult(int resultCode, Intent data) {
             if (data == null || resultCode != RESULT_OK)
                 return "";
             Uri uri = data.getData();
+            if (uri == null)
+                return "";
             if ("file".equals(uri.getScheme())) {
                 String path = uri.getPath();
                 return path == null ? "" : path;
             }
             try {
                 ContentResolver cr = GeckoApp.mAppContext.getContentResolver();
                 Cursor cursor = cr.query(uri, new String[] { OpenableColumns.DISPLAY_NAME },
                                          null, null, null);