summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow
diff options
context:
space:
mode:
authorzhuw <zhuw@codeaurora.org>2018-03-09 19:57:13 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-08-28 23:54:40 -0700
commit40136b39d748d8e9b5c2ce1249b18870b6fcbabf (patch)
tree6f1608e142996a6f034ea28a9ea5b9de1532657d /src/com/android/gallery3d/filtershow
parent2db971aff32dbbee9562da217eb847531bda52ce (diff)
downloadandroid_packages_apps_Gallery2-40136b39d748d8e9b5c2ce1249b18870b6fcbabf.tar.gz
android_packages_apps_Gallery2-40136b39d748d8e9b5c2ce1249b18870b6fcbabf.tar.bz2
android_packages_apps_Gallery2-40136b39d748d8e9b5c2ce1249b18870b6fcbabf.zip
Fix null pointer when copy representantion
add filter Change-Id: I624079604210042b47c94ac7ce6bb2b5a070e50d
Diffstat (limited to 'src/com/android/gallery3d/filtershow')
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
index 2bd121641..f5a56897d 100644
--- a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
@@ -156,6 +156,7 @@ public class ImagePreset {
}
public void updateOrAddFilterRepresentation(FilterRepresentation rep) {
+ if (rep == null) return;
int pos = getPositionForRepresentation(rep);
if (pos != -1) {
mFilters.elementAt(pos).useParametersFrom(rep);