summaryrefslogtreecommitdiffstats
path: root/rs/java
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-03-16 20:26:43 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-16 20:26:43 +0000
commit716475daa1562b9a7cd950215d83364756ef065a (patch)
treeac8b5e124d0077bfa08f8586f6541aebd443f758 /rs/java
parent6ec9fd8b3b6c6722a86921a0d065b092c17082e8 (diff)
parente685753136ee8e88212ad95b24284a153c86a0c1 (diff)
downloadframeworks_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.java6
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);