From 288967eff4ea917e0f608e6fc1ad8b446f9fdf24 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Fri, 6 Mar 2020 17:29:43 -0500 Subject: [PATCH] SWDEV-193956 - Fix a regression in OCL for user events - Check the queue for nullptr, since the user events may not have a queue, associated with them Change-Id: Ib969a052acc9108ca3fd0c063157fe4d47c5b244 --- rocclr/platform/command.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rocclr/platform/command.cpp b/rocclr/platform/command.cpp index 9b80271ef6..c0867d5b27 100644 --- a/rocclr/platform/command.cpp +++ b/rocclr/platform/command.cpp @@ -190,7 +190,8 @@ bool Event::awaitCompletion() { } ClPrint(LOG_DEBUG, LOG_WAIT, "waiting for event %p to complete, current status %d", this, status_); - if (command().queue()->vdev()->ActiveWait()) { + auto* queue = command().queue(); + if ((queue != nullptr) && queue->vdev()->ActiveWait()) { while (status_ > CL_COMPLETE) { amd::Os::yield(); }