We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ad63d24 + 00890ae commit 7f22b34Copy full SHA for 7f22b34
modules/core/src/ocl.cpp
@@ -6458,6 +6458,9 @@ struct Image2D::Impl
6458
CV_Error(Error::OpenCLApiCallError, "OpenCL runtime not found!");
6459
6460
cl_context context = (cl_context)Context::getDefault().ptr();
6461
+ if (!context)
6462
+ return false;
6463
+
6464
// Figure out how many formats are supported by this context.
6465
cl_uint numFormats = 0;
6466
cl_int err = clGetSupportedImageFormats(context, CL_MEM_READ_WRITE,
0 commit comments