summaryrefslogtreecommitdiff
path: root/src/clpp11.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/clpp11.hpp')
-rw-r--r--src/clpp11.hpp4
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