From f25951c412dec1329292136a171bf876b9cb7fbd Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Mon, 30 Aug 2021 11:46:14 +0000 Subject: [PATCH] core(ocl): handle NULL in dumpValue() debug call - NULL is used for allocation of workgroup local variables --- modules/core/src/ocl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/src/ocl.cpp b/modules/core/src/ocl.cpp index 2d85a32366..0c14e7f3e0 100644 --- a/modules/core/src/ocl.cpp +++ b/modules/core/src/ocl.cpp @@ -2981,6 +2981,8 @@ bool Kernel::empty() const static cv::String dumpValue(size_t sz, const void* p) { + if (!p) + return "NULL"; if (sz == 4) return cv::format("%d / %uu / 0x%08x / %g", *(int*)p, *(int*)p, *(int*)p, *(float*)p); if (sz == 8)