summaryrefslogtreecommitdiffstats
path: root/src
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
commit0f8047fe826a84829ab37bc7cd24c8a4dea0db64 (patch)
tree7bf28511fca071c408d247b699db52a2fa04efe5 /src
parent2fc7efdcd75279649091471dda3ee600db25a995 (diff)
downloadandroid_packages_apps_Gallery2-0f8047fe826a84829ab37bc7cd24c8a4dea0db64.tar.gz
android_packages_apps_Gallery2-0f8047fe826a84829ab37bc7cd24c8a4dea0db64.tar.bz2
android_packages_apps_Gallery2-0f8047fe826a84829ab37bc7cd24c8a4dea0db64.zip
Fix for null check with RS allocations.
Bug: 8243554 Change-Id: I49da16f530a7283a801b3739ee7ba06bc7e4dad7
Diffstat (limited to 'src')
-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,