summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/pipeline
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-12-17 02:50:17 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-12-17 02:50:17 -0800
commit49c3de4b0da4377f58efa0ef113fff3d5a9f368e (patch)
tree8081fddf4b86a96192b5d971a21cee6e8d2feaf8 /src/com/android/gallery3d/filtershow/pipeline
parent3ff555aa6f6ef4cb342bef60d277df38b60483fc (diff)
parent1935f4c5db2ec505a7780958b2f76366fde851c5 (diff)
downloadandroid_packages_apps_Gallery2-49c3de4b0da4377f58efa0ef113fff3d5a9f368e.tar.gz
android_packages_apps_Gallery2-49c3de4b0da4377f58efa0ef113fff3d5a9f368e.tar.bz2
android_packages_apps_Gallery2-49c3de4b0da4377f58efa0ef113fff3d5a9f368e.zip
Merge "Gallery2: Fix monkey test fail"
Diffstat (limited to 'src/com/android/gallery3d/filtershow/pipeline')
-rw-r--r--src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
index 844a8fb16..18321f567 100644
--- a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
+++ b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
@@ -67,9 +67,11 @@ public class ImagePreset {
}
public ImagePreset(ImagePreset source) {
- for (int i = 0; i < source.mFilters.size(); i++) {
- FilterRepresentation sourceRepresentation = source.mFilters.elementAt(i);
- mFilters.add(sourceRepresentation.copy());
+ if (source != null && source.mFilters != null) {
+ for (int i = 0; i < source.mFilters.size(); i++) {
+ FilterRepresentation sourceRepresentation = source.mFilters.elementAt(i);
+ mFilters.add(sourceRepresentation.copy());
+ }
}
}