summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhuw <zhuw@codeaurora.org>2018-11-26 16:06:34 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-12-10 18:12:55 -0800
commit4e4eea7b124595dea584db27c391bbced7d886cc (patch)
tree8a2b83e886ff7bc2ecce4b1b4985ef175e6314ff
parent0e13f5a5b5098b78d6c446e201f0ef7be8db2d0e (diff)
downloadandroid_packages_apps_Gallery2-4e4eea7b124595dea584db27c391bbced7d886cc.tar.gz
android_packages_apps_Gallery2-4e4eea7b124595dea584db27c391bbced7d886cc.tar.bz2
android_packages_apps_Gallery2-4e4eea7b124595dea584db27c391bbced7d886cc.zip
fix NullPointerException in applyOriginalAspect
add null pointer filter Change-Id: Ic864d4b555432ddf5b706850fdeecd484f22fc14
-rwxr-xr-x[-rw-r--r--]src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java b/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
index baabbadb9..8e3708181 100644..100755
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageCrop.java
@@ -165,6 +165,9 @@ public class ImageCrop extends ImageShow {
}
public void applyOriginalAspect() {
+ if(mCropObj == null) {
+ return;
+ }
RectF outer = mCropObj.getOuterBounds();
float w = outer.width();
float h = outer.height();