From 45677819e88d794f0c4416ef0cec55efbf270bfc Mon Sep 17 00:00:00 2001 From: berak Date: Sun, 8 Jul 2018 09:51:06 +0200 Subject: [PATCH] core: fix autobuffer usage in opengl.cpp --- modules/core/src/opengl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/opengl.cpp b/modules/core/src/opengl.cpp index 08cfb4e..6661b66 100644 --- a/modules/core/src/opengl.cpp +++ b/modules/core/src/opengl.cpp @@ -1624,12 +1624,12 @@ Context& initializeContextFromGL() if (status == CL_SUCCESS) { extensionStr.allocate(extensionSize+1); - status = clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, extensionSize, (char*)extensionStr, NULL); + status = clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, extensionSize, (char*)extensionStr.data(), NULL); } if (status != CL_SUCCESS) CV_Error(cv::Error::OpenCLInitError, "OpenCL: Can't get platform extension string"); - if (!strstr((const char*)extensionStr, "cl_khr_gl_sharing")) + if (!strstr((const char*)extensionStr.data(), "cl_khr_gl_sharing")) continue; } -- 2.7.4