summaryrefslogtreecommitdiffstats
path: root/src
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
commit4230534827415a30840e122347354ea0be95a701 (patch)
treede244f8d388cc613c280479d4a4ce2d064304e38 /src
parentef976a7a48bf3c626c558d8bdcf68e2743d83a6f (diff)
downloadandroid_packages_apps_Snap-4230534827415a30840e122347354ea0be95a701.tar.gz
android_packages_apps_Snap-4230534827415a30840e122347354ea0be95a701.tar.bz2
android_packages_apps_Snap-4230534827415a30840e122347354ea0be95a701.zip
Fix xmp crash
Change-Id: I256062b19e540fa77ff982552e62977789caf29b
Diffstat (limited to 'src')
-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;