diff --git a/opencl/api/opencl/amdocl/cl_gl.cpp b/opencl/api/opencl/amdocl/cl_gl.cpp index 54f3608656..8a367cbe4f 100644 --- a/opencl/api/opencl/amdocl/cl_gl.cpp +++ b/opencl/api/opencl/amdocl/cl_gl.cpp @@ -1624,6 +1624,7 @@ cl_mem clCreateFromGLBufferAMD(Context& amdContext, cl_mem_flags flags, GLuint b if (NULL == mem) { LogPrintfError("Can't allocate memory size - 0x%08X bytes!", pBufferGL->getSize()); *not_null(errcode_ret) = CL_INVALID_GL_OBJECT; + return (cl_mem)0; } mem->processGLResource(device::Memory::GLDecompressResource); }