Merge "Frameworks/base: Check before foreach in Script"

This commit is contained in:
Andreas Gampe
2015-03-16 19:17:44 +00:00
committed by Gerrit Code Review

View File

@@ -239,9 +239,11 @@ public class Script extends BaseObj {
FieldPacker v, LaunchOptions sc) { FieldPacker v, LaunchOptions sc) {
// TODO: Is this necessary if nScriptForEach calls validate as well? // TODO: Is this necessary if nScriptForEach calls validate as well?
mRS.validate(); mRS.validate();
if (ains != null) {
for (Allocation ain : ains) { for (Allocation ain : ains) {
mRS.validateObject(ain); mRS.validateObject(ain);
} }
}
mRS.validateObject(aout); mRS.validateObject(aout);
if (ains == null && aout == null) { if (ains == null && aout == null) {