diff options
author | Chris Wren <cwren@android.com> | 2013-01-10 11:43:42 -0500 |
---|---|---|
committer | Chris Wren <cwren@android.com> | 2013-01-10 11:43:42 -0500 |
commit | 9cf665e832e1ad67dcee625f78c78743e60aecbe (patch) | |
tree | a4ac3d0af2b9763d814d0eab0a9e55c14f7048e1 /src | |
parent | bed703ef28f013639db3cd7a6b8a6e94d61075da (diff) | |
download | android_packages_screensavers_PhotoTable-9cf665e832e1ad67dcee625f78c78743e60aecbe.tar.gz android_packages_screensavers_PhotoTable-9cf665e832e1ad67dcee625f78c78743e60aecbe.tar.bz2 android_packages_screensavers_PhotoTable-9cf665e832e1ad67dcee625f78c78743e60aecbe.zip |
guard against NPEs in bitmap decoding.
Somehow people occasionally see null bitmaps with valid BitmapFactory.Options.
Bug: 7403211
Change-Id: If6e18aa6b1c9ea6b8344f039d26197fbb44ff0d9
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/dreams/phototable/PhotoTable.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/dreams/phototable/PhotoTable.java b/src/com/android/dreams/phototable/PhotoTable.java index 36b274c..b0d7a01 100644 --- a/src/com/android/dreams/phototable/PhotoTable.java +++ b/src/com/android/dreams/phototable/PhotoTable.java @@ -260,7 +260,7 @@ public class PhotoTable extends FrameLayout { table.mLongSide, table.mShortSide); int photoWidth = mOptions.outWidth; int photoHeight = mOptions.outHeight; - if (mOptions.outWidth <= 0 || mOptions.outHeight <= 0) { + if (decodedPhoto == null || mOptions.outWidth <= 0 || mOptions.outHeight <= 0) { photo = null; } else { decodedPhoto.setHasMipMap(true); |