Merge "fix calling Allocation.copyFrom without context" into gb-ub-photos-bryce
diff --git a/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java b/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
index 8c312a9..4279b47 100644
--- a/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
+++ b/src/com/android/gallery3d/filtershow/cache/CachingPipeline.java
@@ -393,7 +393,9 @@
                     mOutPixelsAllocation.getType());
             needsUpdate = true;
         }
-        mInPixelsAllocation.copyFrom(bitmap);
+        if (RS != null) {
+            mInPixelsAllocation.copyFrom(bitmap);
+        }
         if (bitmap.getWidth() != mWidth
                 || bitmap.getHeight() != mHeight) {
             mWidth = bitmap.getWidth();