diff options
| author | 2009-08-20 17:22:40 -0700 | |
|---|---|---|
| committer | 2009-08-20 17:22:40 -0700 | |
| commit | d8e4161f114331343b897cbacea927e7e60e7b17 (patch) | |
| tree | b9386c3681b6ceed3703c47acfa0a25f3ab9656e | |
| parent | 25ffcdc9d7e32c9c1eeb2b48cc2f17d1353e9fae (diff) | |
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.
| -rw-r--r-- | graphics/java/android/renderscript/RenderScript.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index 076a5d43f5c4..1bdabe723224 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java @@ -281,7 +281,11 @@ public class RenderScript { // 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) { |