summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2012-11-28 22:14:20 -0800
committernicolasroard <nicolasroard@google.com>2012-11-28 22:14:20 -0800
commit8d427b8a58fabb9164738b9ed0da2809ca3d60e0 (patch)
treed416810efaf5660bff75a296a577eff6d3e8ac63 /src/com/android/gallery3d/filtershow
parent2aa25c488216f498b941245266d1eb3de97fe09b (diff)
downloadandroid_packages_apps_Snap-8d427b8a58fabb9164738b9ed0da2809ca3d60e0.tar.gz
android_packages_apps_Snap-8d427b8a58fabb9164738b9ed0da2809ca3d60e0.tar.bz2
android_packages_apps_Snap-8d427b8a58fabb9164738b9ed0da2809ca3d60e0.zip
Fix potential crash
(regression introduced with fix for 7406402) bug:7406402 Change-Id: I7ba92b4cb4fe2976583eba54a5bd25a29eae9d5c
Diffstat (limited to 'src/com/android/gallery3d/filtershow')
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
index a310358ce..1d198e45c 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
@@ -51,6 +51,9 @@ public class ImageFilterBorder extends ImageFilter {
if (!isBorderFilter) {
return false;
}
+ if (!(filter instanceof ImageFilterBorder)) {
+ return false;
+ }
ImageFilterBorder borderFilter = (ImageFilterBorder) filter;
if (mNinePatch != borderFilter.mNinePatch) {
return false;
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java
index 3d6954691..ade3cb26b 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterParametricBorder.java
@@ -56,6 +56,9 @@ public class ImageFilterParametricBorder extends ImageFilter {
if (!isBorderFilter) {
return false;
}
+ if (!(filter instanceof ImageFilterParametricBorder)) {
+ return false;
+ }
ImageFilterParametricBorder borderFilter = (ImageFilterParametricBorder) filter;
if (borderFilter.mBorderColor != mBorderColor) {
return false;