From: Cristy Date: Sat, 26 May 2018 10:21:22 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/1134 X-Git-Tag: 7.0.7-36~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=316977d354673c4111d02ce7baf58c75963921e2;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/1134 --- diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index dc59e7dad..d5530e650 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -3000,7 +3000,7 @@ static MagickCLEnv RelinquishMagickCLEnv(MagickCLEnv clEnv) i; for (i=0; i < clEnv->number_contexts; i++) - if (clEnv->contexts[i]) + if (clEnv->contexts[i] != (cl_context) NULL) (void) openCL_library->clReleaseContext(clEnv->contexts[i]); clEnv->contexts=(cl_context *) RelinquishMagickMemory(clEnv->contexts); }