Allow null to be re-bound as a root script. This was always legal from native and just a limitation of the java binding for the API.
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index 076a5d4..1bdabe7 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -281,7 +281,11 @@
// Root state
public void contextBindRootScript(Script s) {
- nContextBindRootScript(s.mID);
+ int id = 0;
+ if(s != null) {
+ id = s.mID;
+ }
+ nContextBindRootScript(id);
}
//public void contextBindSampler(Sampler s, int slot) {