commit | 1c8da1cccedc7194cc02edbdf26249bc3550195c | [log] [tgz] |
---|---|---|
author | Jason Sams <jsams@google.com> | Mon Jun 23 15:15:08 2014 -0700 |
committer | Jason Sams <jsams@google.com> | Mon Jun 23 15:15:08 2014 -0700 |
tree | 93cfad277aadcf6936ea7898023f80d498d9de36 | |
parent | 0b57289678a4dc82fefa4894901af1be7f5cc3c6 [diff] |
Add check and throw for failed Intrinsic init. Change-Id: Icd53b3edd8e887d3692e5815dc0c38cd68b7aeb1
diff --git a/rs/java/android/renderscript/ScriptIntrinsic.java b/rs/java/android/renderscript/ScriptIntrinsic.java index 8719e017..4edce84 100644 --- a/rs/java/android/renderscript/ScriptIntrinsic.java +++ b/rs/java/android/renderscript/ScriptIntrinsic.java
@@ -27,5 +27,8 @@ public abstract class ScriptIntrinsic extends Script { ScriptIntrinsic(long id, RenderScript rs) { super(id, rs); + if (id == 0) { + throw new RSRuntimeException("Loading of ScriptIntrinsic failed."); + } } }