From: Ruben Brunk Date: Thu, 21 Feb 2013 23:43:33 +0000 (-0800) Subject: Fix for null check with RS allocations. X-Git-Tag: android-x86-6.0-r3~68^2~28^2~213^2~19^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2^2~428^2~2^2~201^2~309 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=0f8047fe826a84829ab37bc7cd24c8a4dea0db64;p=android-x86%2Fpackages-apps-Camera2.git Fix for null check with RS allocations. Bug: 8243554 Change-Id: I49da16f530a7283a801b3739ee7ba06bc7e4dad7 --- 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,