Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/intern/COM_OpenCLDevice.cpp')
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index b47d78af975..0aa054b8c77 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -133,8 +133,9 @@ cl_mem OpenCLDevice::COM_clAttachMemoryBufferToKernelParameter(cl_kernel kernel,
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- if (error == CL_SUCCESS)
+ if (error == CL_SUCCESS) {
cleanup->push_back(clBuffer);
+ }
error = clSetKernelArg(kernel, parameterIndex, sizeof(cl_mem), &clBuffer);
if (error != CL_SUCCESS) {
@@ -263,8 +264,9 @@ cl_kernel OpenCLDevice::COM_clCreateKernel(const char *kernelname,
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
else {
- if (clKernelsToCleanUp)
+ if (clKernelsToCleanUp) {
clKernelsToCleanUp->push_back(kernel);
+ }
}
return kernel;
}