diff options
author | Cedric Nugteren <web@cedricnugteren.nl> | 2018-06-28 20:35:18 +0900 |
---|---|---|
committer | Cedric Nugteren <web@cedricnugteren.nl> | 2018-06-28 20:35:18 +0900 |
commit | e3eedacbcce5f3e102027a84708ec85fc1cd3a87 (patch) | |
tree | bb56c8f249fcfbd3aacc0c7ec337a74bd9faf28b /src/clpp11.hpp | |
parent | 4471b67735fecc8089df638cc06c2d5bd3cd3d2c (diff) |
Disabled calls to clReleaseProgram under Windows to avoid segfaults when the OpenCL driver unloads first
Diffstat (limited to 'src/clpp11.hpp')
-rw-r--r-- | src/clpp11.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/clpp11.hpp b/src/clpp11.hpp index ce6f39cb..8d6a1127 100644 --- a/src/clpp11.hpp +++ b/src/clpp11.hpp @@ -463,7 +463,9 @@ class Program { // Clean-up ~Program() { - if (program_) { CheckErrorDtor(clReleaseProgram(program_)); } + #ifndef _MSC_VER // causes an access violation under Windows when the driver is already unloaded + if (program_) { CheckErrorDtor(clReleaseProgram(program_)); } + #endif } // Compiles the device program and checks whether or not there are any warnings/errors |