diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2015-05-04 19:06:38 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-04 19:06:39 +0000 |
| commit | 5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b (patch) | |
| tree | 2c39cc23e437c202b5c7d528c4a5167983947647 /core/java | |
| parent | e678b41cdb56847c094260607ea39aea4abb808e (diff) | |
| parent | c840681dbd42978745274e7c44d8c37a1f68a746 (diff) | |
| download | frameworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.zip frameworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.tar.gz frameworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.tar.bz2 | |
Merge "Avoid NPE when fsUuid is null." into mnc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/storage/StorageManager.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java index 50e7d1c..3fdabee 100644 --- a/core/java/android/os/storage/StorageManager.java +++ b/core/java/android/os/storage/StorageManager.java @@ -584,7 +584,7 @@ public class StorageManager { // Nickname always takes precedence when defined if (!TextUtils.isEmpty(vol.fsUuid)) { final VolumeRecord rec = findRecordByUuid(vol.fsUuid); - if (!TextUtils.isEmpty(rec.nickname)) { + if (rec != null && !TextUtils.isEmpty(rec.nickname)) { return rec.nickname; } } |
