diff options
author | Mark Janes <mark.a.janes@intel.com> | 2015-11-02 17:48:16 -0800 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-06-19 14:04:45 -0700 |
commit | 5a5fb7d8f451647554aa57fe758dab2abdf8d6d9 (patch) | |
tree | fd8a17b65afa698e3bd43b3c32bf3f568c619f4c /retrace | |
parent | 64948e559063fe7183f475f3c7c516abbec73cc7 (diff) |
fix invalid iterator manipulation
Due to a coding error, I was clearing a container while iterating. I
intended to clear the container after iteration.
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/daemon/glframe_metrics.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 |