Merge "Avoid NPE when fsUuid is null." into mnc-dev

This commit is contained in:
Jeff Sharkey
2015-05-04 19:06:38 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}
}