Merge "Frameworks/base: Fix potential NPE in Script"
This commit is contained in:
@@ -251,9 +251,14 @@ public class Script extends BaseObj {
|
|||||||
"At least one of ain or aout is required to be non-null.");
|
"At least one of ain or aout is required to be non-null.");
|
||||||
}
|
}
|
||||||
|
|
||||||
long[] in_ids = new long[ains.length];
|
long[] in_ids;
|
||||||
for (int index = 0; index < ains.length; ++index) {
|
if (ains != null) {
|
||||||
in_ids[index] = ains[index].getID(mRS);
|
in_ids = new long[ains.length];
|
||||||
|
for (int index = 0; index < ains.length; ++index) {
|
||||||
|
in_ids[index] = ains[index].getID(mRS);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
in_ids = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
long out_id = 0;
|
long out_id = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user