From 3416ad385d188ec0e6b60ddaceec7e9c4f1f8d18 Mon Sep 17 00:00:00 2001 From: foreman Date: Wed, 25 Apr 2018 11:40:42 -0400 Subject: [PATCH] P4 to Git Change 1546206 by gandryey@gera-w8 on 2018/04/25 11:32:37 SWDEV-151852 - [CQE OCL][DTB-BLOCKER][VEGA10][WIN][LNX][QR] Observed crash while running Multiple device context test due to FAULTY CL#1544622 - Add a check for nullptr in case if virtual device object was destroyed before memory allocation Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.cpp#10 edit --- rocclr/runtime/device/pal/palconstbuf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rocclr/runtime/device/pal/palconstbuf.cpp b/rocclr/runtime/device/pal/palconstbuf.cpp index 9121b3f6a2..c0dfd536e2 100644 --- a/rocclr/runtime/device/pal/palconstbuf.cpp +++ b/rocclr/runtime/device/pal/palconstbuf.cpp @@ -21,7 +21,7 @@ ManagedBuffer::ManagedBuffer(VirtualGPU& gpu, uint32_t size) // ================================================================================================ void ManagedBuffer::release() { for (auto it : buffers_) { - if (it->data() != nullptr) { + if ((it != nullptr) && (it->data() != nullptr)) { it->unmap(&gpu_); } delete it;