core(ocl): handle NULL in dumpValue() debug call
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Mon, 30 Aug 2021 11:46:14 +0000 (11:46 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Mon, 30 Aug 2021 11:47:51 +0000 (11:47 +0000)
- NULL is used for allocation of workgroup local variables

modules/core/src/ocl.cpp

index 2d85a32..0c14e7f 100644 (file)
@@ -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)