diff options
author | Michael Bien <[email protected]> | 2011-04-20 00:35:22 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-04-20 00:35:22 +0200 |
commit | 3c06ab634c7119249d37f808a5a979a5f7776de5 (patch) | |
tree | 69677e44e271126dd01e85bedc0f969fa0297530 /src/com/jogamp/opencl/CLProgram.java | |
parent | d50d5a7b1c0411492d111d9a3e5a781bc8cdfd55 (diff) |
CLProgram.getSource() should not throw CLInvalidValueException if program does not have any sources (only happens on certain drivers).
Diffstat (limited to 'src/com/jogamp/opencl/CLProgram.java')
-rw-r--r-- | src/com/jogamp/opencl/CLProgram.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLProgram.java b/src/com/jogamp/opencl/CLProgram.java index bbae75d9..bc3727f8 100644 --- a/src/com/jogamp/opencl/CLProgram.java +++ b/src/com/jogamp/opencl/CLProgram.java @@ -584,7 +584,12 @@ public class CLProgram extends CLObject implements CLResource { * each call of this method calls into Open */ public String getSource() { - return getProgramInfoString(CL_PROGRAM_SOURCE); + // some drivers return IVE codes if the program haven't been built from source. + try{ + return getProgramInfoString(CL_PROGRAM_SOURCE); + }catch(CLException.CLInvalidValueException ingore) { + return ""; + } } /** |