summaryrefslogtreecommitdiffstats
path: root/rs/java
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2014-06-23 15:15:08 -0700
committerJason Sams <jsams@google.com>2014-06-23 15:15:08 -0700
commit1c8da1cccedc7194cc02edbdf26249bc3550195c (patch)
tree93cfad277aadcf6936ea7898023f80d498d9de36 /rs/java
parent0b57289678a4dc82fefa4894901af1be7f5cc3c6 (diff)
downloadframeworks_base-1c8da1cccedc7194cc02edbdf26249bc3550195c.zip
frameworks_base-1c8da1cccedc7194cc02edbdf26249bc3550195c.tar.gz
frameworks_base-1c8da1cccedc7194cc02edbdf26249bc3550195c.tar.bz2
Add check and throw for failed Intrinsic init.
Change-Id: Icd53b3edd8e887d3692e5815dc0c38cd68b7aeb1
Diffstat (limited to 'rs/java')
-rw-r--r--rs/java/android/renderscript/ScriptIntrinsic.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/ScriptIntrinsic.java b/rs/java/android/renderscript/ScriptIntrinsic.java
index 8719e01..4edce84 100644
--- a/rs/java/android/renderscript/ScriptIntrinsic.java
+++ b/rs/java/android/renderscript/ScriptIntrinsic.java
@@ -27,5 +27,8 @@ package android.renderscript;
public abstract class ScriptIntrinsic extends Script {
ScriptIntrinsic(long id, RenderScript rs) {
super(id, rs);
+ if (id == 0) {
+ throw new RSRuntimeException("Loading of ScriptIntrinsic failed.");
+ }
}
}