From c619b9510f048f5aab7ae3b2a1482e695dc6cfd7 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Thu, 21 Feb 2013 15:43:33 -0800 Subject: Fix for null check with RS allocations. Bug: 8243554 Change-Id: I49da16f530a7283a801b3739ee7ba06bc7e4dad7 --- src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java index d5297904d..74712be47 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java @@ -43,9 +43,11 @@ public abstract class ImageFilterRS extends ImageFilter { || (bitmap.getHeight() != sOldBitmap.getHeight())) { if (mInPixelsAllocation != null) { mInPixelsAllocation.destroy(); + mInPixelsAllocation = null; } if (mOutPixelsAllocation != null) { mOutPixelsAllocation.destroy(); + mOutPixelsAllocation = null; } Bitmap bitmapBuffer = bitmap.copy(mBitmapConfig, true); mOutPixelsAllocation = Allocation.createFromBitmap(mRS, bitmapBuffer, -- cgit v1.2.3