diff --git a/sycl/source/detail/scheduler/commands.cpp b/sycl/source/detail/scheduler/commands.cpp index 6d08ce78d543a..5174fc966e905 100644 --- a/sycl/source/detail/scheduler/commands.cpp +++ b/sycl/source/detail/scheduler/commands.cpp @@ -3192,6 +3192,7 @@ ur_result_t ExecCGCommand::enqueueImpQueue() { HostTask->MHostTask->MInteropTask}; ur_bool_t NativeCommandSupport = false; + assert(MQueue && "Native command should have an associated queue"); MQueue->getPlugin()->call( detail::getSyclObjImpl(MQueue->get_device())->getHandleRef(), UR_DEVICE_INFO_ENQUEUE_NATIVE_COMMAND_SUPPORT_EXP,