From cf739839e3f9ddf880476143e1e823c2a6ed592c Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Sun, 20 Jun 2010 16:51:48 +1000 Subject: Don't call clRetainEvent on a null event id. --- src/opencl/qcluserevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/opencl/qcluserevent.cpp b/src/opencl/qcluserevent.cpp index 2afb515..7689447 100644 --- a/src/opencl/qcluserevent.cpp +++ b/src/opencl/qcluserevent.cpp @@ -153,7 +153,7 @@ void QCLUserEvent::setStatus(cl_int status) */ void QCLUserEvent::validateEvent() { - if (commandType() != CL_COMMAND_USER) { + if (m_id && commandType() != CL_COMMAND_USER) { clReleaseEvent(m_id); m_id = 0; } -- cgit v1.2.3