diff options
Diffstat (limited to 'rs/java/android/renderscript')
-rw-r--r-- | rs/java/android/renderscript/Allocation.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/Allocation.java b/rs/java/android/renderscript/Allocation.java index 05ad1615dc81..238bf0f5a335 100644 --- a/rs/java/android/renderscript/Allocation.java +++ b/rs/java/android/renderscript/Allocation.java @@ -2895,6 +2895,7 @@ public class Allocation extends BaseObj { mAllocationArray[0] = createTyped(rs, t, usage); if ((usage & USAGE_IO_INPUT) != 0) { if (numAlloc > MAX_NUMBER_IO_INPUT_ALLOC) { + mAllocationArray[0].destroy(); throw new RSIllegalArgumentException("Exceeds the max number of Allocations allowed: " + MAX_NUMBER_IO_INPUT_ALLOC); } |