diff --git a/source/adapters/hip/event.cpp b/source/adapters/hip/event.cpp index 313212724a..067e4e1e7a 100644 --- a/source/adapters/hip/event.cpp +++ b/source/adapters/hip/event.cpp @@ -192,7 +192,7 @@ urEventWait(uint32_t numEvents, const ur_event_handle_t *phEventWaitList) { try { auto Context = phEventWaitList[0]->getContext(); - ScopedContext Active(phEventWaitList[0]->getDevice()); + ScopedContext Active(Context->getDevices()[0]); auto WaitFunc = [Context](ur_event_handle_t Event) -> ur_result_t { UR_ASSERT(Event, UR_RESULT_ERROR_INVALID_EVENT);