Possible fix for [#36086] Activating the opencl option in the compositor causes blend...
[blender.git] / source / blender / compositor / intern / COM_WorkScheduler.cpp
index 402fa28e210c856a1eced34cd09a1cae322dae74..be9a3612a0b52de181f1c806c59c3be26e03fb72 100644 (file)
@@ -304,7 +304,8 @@ void WorkScheduler::initialize(bool use_opencl)
                g_context = NULL;
                g_program = NULL;
 
-               OCL_init(); /* this will check and skip if already initialized */
+               if(!OCL_init()) /* this will check for errors and skip if already initialized */
+                       return;
 
                if (clCreateContextFromType) {
                        cl_uint numberOfPlatforms = 0;