summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-15 19:16:16 -0700
committernicolasroard <nicolasroard@google.com>2013-03-15 19:16:16 -0700
commit4ea01ce27d0aecd1b63d7e99b747c9858fa93b02 (patch)
tree5d01cd78ae82a53723d91fe46484dd1b802d2fe6
parent38ac5c3eab22ac051859b8eda40cfa5ceb675d53 (diff)
downloadandroid_packages_apps_Gallery2-4ea01ce27d0aecd1b63d7e99b747c9858fa93b02.tar.gz
android_packages_apps_Gallery2-4ea01ce27d0aecd1b63d7e99b747c9858fa93b02.tar.bz2
android_packages_apps_Gallery2-4ea01ce27d0aecd1b63d7e99b747c9858fa93b02.zip
Fix xmp crash
Change-Id: I256062b19e540fa77ff982552e62977789caf29b
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java
index 276da139c..9874deaaf 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java
@@ -140,6 +140,9 @@ public class ImageFilterTinyPlanet extends SimpleImageFilter {
int left = getInt(xmp, CROPPED_AREA_LEFT);
int top = getInt(xmp, CROPPED_AREA_TOP);
+ if (fullPanoWidth == 0 || fullPanoHeight == 0) {
+ return bitmapIn;
+ }
// Make sure the intermediate image has the similar size to the
// input.
Bitmap paddedBitmap = null;