diff --git a/TracyOpenCL.hpp b/TracyOpenCL.hpp index 94aa1162..6190f802 100644 --- a/TracyOpenCL.hpp +++ b/TracyOpenCL.hpp @@ -125,7 +125,8 @@ namespace tracy { if (eventInfo.phase == EventPhase::End) { // Done with the event, so release it - assert(clReleaseEvent(event) == CL_SUCCESS); + err = clReleaseEvent(event); + assert(err == CL_SUCCESS); } m_tail = (m_tail + 1) % QueryCount;