OSDN Git Service

Fix for null check with RS allocations.
authorRuben Brunk <rubenbrunk@google.com>
Thu, 21 Feb 2013 23:43:33 +0000 (15:43 -0800)
committerRuben Brunk <rubenbrunk@google.com>
Thu, 21 Feb 2013 23:43:33 +0000 (15:43 -0800)
Bug: 8243554
Change-Id: I49da16f530a7283a801b3739ee7ba06bc7e4dad7

src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java

index d529790..74712be 100644 (file)
@@ -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,