From 4230534827415a30840e122347354ea0be95a701 Mon Sep 17 00:00:00 2001 From: nicolasroard Date: Fri, 15 Mar 2013 19:16:16 -0700 Subject: Fix xmp crash Change-Id: I256062b19e540fa77ff982552e62977789caf29b --- .../android/gallery3d/filtershow/filters/ImageFilterTinyPlanet.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; -- cgit v1.2.3