Don't include inf/nan times in summation

* These can be generated by buggy drivers particularly on GL, so try to mitigate
  the effect of that.
This commit is contained in:
baldurk
2021-08-30 13:15:59 +01:00
parent b1ec61acc7
commit 4e58264035
+3
View File
@@ -991,6 +991,9 @@ private:
if(a.eventId >= m_Times.size())
continue;
if(qIsNaN(m_Times[a.eventId]) || qIsInf(m_Times[a.eventId]))
continue;
// add the time for this event, if it's non-negative. Because we fill out nodes in reverse
// order, any children that are nodes themselves should be populated by now
duration += qMax(0.0, m_Times[a.eventId]);