diff options
author | Andreas Gampe <agampe@google.com> | 2015-03-16 20:26:43 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-16 20:26:43 +0000 |
commit | 716475daa1562b9a7cd950215d83364756ef065a (patch) | |
tree | ac8b5e124d0077bfa08f8586f6541aebd443f758 /rs/java | |
parent | 6ec9fd8b3b6c6722a86921a0d065b092c17082e8 (diff) | |
parent | e685753136ee8e88212ad95b24284a153c86a0c1 (diff) | |
download | frameworks_base-716475daa1562b9a7cd950215d83364756ef065a.zip frameworks_base-716475daa1562b9a7cd950215d83364756ef065a.tar.gz frameworks_base-716475daa1562b9a7cd950215d83364756ef065a.tar.bz2 |
am e6857531: am f3e581c9: Merge "Frameworks/base: Check before foreach in Script"
* commit 'e685753136ee8e88212ad95b24284a153c86a0c1':
Frameworks/base: Check before foreach in Script
Diffstat (limited to 'rs/java')
-rw-r--r-- | rs/java/android/renderscript/Script.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/Script.java b/rs/java/android/renderscript/Script.java index d352130..83aeedd 100644 --- a/rs/java/android/renderscript/Script.java +++ b/rs/java/android/renderscript/Script.java @@ -239,8 +239,10 @@ public class Script extends BaseObj { FieldPacker v, LaunchOptions sc) { // TODO: Is this necessary if nScriptForEach calls validate as well? mRS.validate(); - for (Allocation ain : ains) { - mRS.validateObject(ain); + if (ains != null) { + for (Allocation ain : ains) { + mRS.validateObject(ain); + } } mRS.validateObject(aout); |