diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-17 11:09:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-17 11:09:07 +0400 |
commit | 1b11428101d390e482f6a67adba27f42cda7f4a8 (patch) | |
tree | 087d15d1ca62ccf81cefbf3f35e30fe18a0184c9 /source/blender/compositor/intern/COM_WorkScheduler.cpp | |
parent | d7cc2be2b7820a0967135e6bc7043e586a0c0dd3 (diff) |
fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array.
Diffstat (limited to 'source/blender/compositor/intern/COM_WorkScheduler.cpp')
-rw-r--r-- | source/blender/compositor/intern/COM_WorkScheduler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp index 1bac06fc4ab..330e61e7fea 100644 --- a/source/blender/compositor/intern/COM_WorkScheduler.cpp +++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp @@ -313,7 +313,8 @@ void WorkScheduler::initialize(bool use_opencl) cl_uint numberOfPlatforms = 0; cl_int error; error = clGetPlatformIDs(0, 0, &numberOfPlatforms); - if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); } + if (error == -1001) { } /* GPU not supported */ + else if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error)); } if (G.f & G_DEBUG) printf("%d number of platforms\n", numberOfPlatforms); cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(sizeof(cl_platform_id) * numberOfPlatforms, __func__); error = clGetPlatformIDs(numberOfPlatforms, platforms, 0); |