commit | 2698536b3ff60bfee85e47e4a8d4b25fdfdf4db5 | [log] [tgz] |
---|---|---|
author | Jason Sams <rjsams@android.com> | Tue May 03 15:01:58 2011 -0700 |
committer | Jason Sams <rjsams@android.com> | Tue May 03 17:27:26 2011 -0700 |
tree | 9deee58d4f07e697fbef0cb78384c3e509cd3d07 | |
parent | e98c27e5e4f450b294cc525e1de65a194e9904d2 [diff] [blame] |
Fix error checks on compute context creation. Remove GL init for compute scripts. Change-Id: I1bce8e4112babf4345fa56a30a9bed753734d8d6
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java index 4c505ec..eea0986c 100644 --- a/graphics/java/android/renderscript/RenderScript.java +++ b/graphics/java/android/renderscript/RenderScript.java
@@ -839,6 +839,9 @@ rs.mDev = rs.nDeviceCreate(); rs.mContext = rs.nContextCreate(rs.mDev, 0); + if (rs.mContext == 0) { + throw new RSDriverException("Failed to create RS context."); + } rs.mMessageThread = new MessageThread(rs); rs.mMessageThread.start(); return rs;