diff --git a/sycl/source/detail/queue_impl.cpp b/sycl/source/detail/queue_impl.cpp index d5427ffc5202..d484e10b5e5f 100644 --- a/sycl/source/detail/queue_impl.cpp +++ b/sycl/source/detail/queue_impl.cpp @@ -126,6 +126,7 @@ event queue_impl::mem_advise(const std::shared_ptr &Self, void queue_impl::addEvent(const event &Event) { EventImplPtr EImpl = getSyclObjImpl(Event); + assert(EImpl && "Event implementation is missing"); auto *Cmd = static_cast(EImpl->getCommand()); if (!Cmd) { // if there is no command on the event, we cannot track it with MEventsWeak