From 6ab8dcc682bd97917a7439320495c383a2f55885 Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Wed, 23 Jun 2021 11:41:52 -0400 Subject: [PATCH] SWDEV-292018 - Avoid marker if queue is empty Change-Id: I40a42d67d2c911d2c9a0bf425f36bc795f9539c0 --- rocclr/platform/commandqueue.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rocclr/platform/commandqueue.cpp b/rocclr/platform/commandqueue.cpp index ea80a82dea..4f552e4ab0 100644 --- a/rocclr/platform/commandqueue.cpp +++ b/rocclr/platform/commandqueue.cpp @@ -107,6 +107,10 @@ void HostQueue::finish() { Command* command = nullptr; if (IS_HIP) { command = getLastQueuedCommand(true); + // Check if the queue has nothing to process and return + if (command == nullptr) { + return; + } } if (nullptr == command) { // Send a finish to make sure we finished all commands