diff --git a/source/adapters/cuda/event.cpp b/source/adapters/cuda/event.cpp index ca2cf94c91..f38610de59 100644 --- a/source/adapters/cuda/event.cpp +++ b/source/adapters/cuda/event.cpp @@ -222,7 +222,7 @@ urEventWait(uint32_t numEvents, const ur_event_handle_t *phEventWaitList) { try { auto WaitFunc = [](ur_event_handle_t Event) -> ur_result_t { UR_ASSERT(Event, UR_RESULT_ERROR_INVALID_EVENT); - ScopedContext Active(Event->getQueue()->getDevice()); + ScopedContext Active(Event->getContext()); return Event->wait(); };