summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2013-02-21 15:43:33 -0800
committerRuben Brunk <rubenbrunk@google.com>2013-02-21 15:43:33 -0800
commitc619b9510f048f5aab7ae3b2a1482e695dc6cfd7 (patch)
treea4ecc1aa4b040da5f20eac5c46b3e10bc1254131
parentc67da3cdf3cc655a384d9d591fee051fdafb4630 (diff)
downloadandroid_packages_apps_Snap-c619b9510f048f5aab7ae3b2a1482e695dc6cfd7.tar.gz
android_packages_apps_Snap-c619b9510f048f5aab7ae3b2a1482e695dc6cfd7.tar.bz2
android_packages_apps_Snap-c619b9510f048f5aab7ae3b2a1482e695dc6cfd7.zip
Fix for null check with RS allocations.
Bug: 8243554 Change-Id: I49da16f530a7283a801b3739ee7ba06bc7e4dad7
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java2
1 files changed, 2 insertions, 0 deletions
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,