Checked non-nullness of cbex[dev] before calling clWaitForEvents and clReleaseEvent