From 5a5fb7d8f451647554aa57fe758dab2abdf8d6d9 Mon Sep 17 00:00:00 2001 From: Mark Janes Date: Mon, 2 Nov 2015 17:48:16 -0800 Subject: fix invalid iterator manipulation Due to a coding error, I was clearing a container while iterating. I intended to clear the container after iteration. --- retrace/daemon/glframe_metrics.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'retrace') diff --git a/retrace/daemon/glframe_metrics.cpp b/retrace/daemon/glframe_metrics.cpp index f959e4e4..784d1c78 100644 --- a/retrace/daemon/glframe_metrics.cpp +++ b/retrace/daemon/glframe_metrics.cpp @@ -218,9 +218,10 @@ PerfMetricGroup::publish(MetricId metric, out_data.data.push_back(m_metrics[metric]->getMetric(m_data_buf)); m_free_query_handles.push_back(extant_query.second); - m_extant_query_handles.clear(); } - callback->onMetrics(out_data, experimentCount); + m_extant_query_handles.clear(); + if (callback) + callback->onMetrics(out_data, experimentCount); } void -- cgit v1.2.3