forked from qt-creator/qt-creator
qmlprofiler: Fix a crash in the rangeFilter
Always check the stack before popping an element. Fixes: QTCREATORBUG-24730 Change-Id: I7dc6363137ef002219fbc49b7343cff8112a58c2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -395,7 +395,7 @@ QmlProfilerModelManager::rangeFilter(qint64 rangeStart, qint64 rangeEnd) const
|
||||
if (type.rangeType() != MaximumRangeType) {
|
||||
if (event.rangeStage() == RangeStart)
|
||||
stack.push(event);
|
||||
else if (event.rangeStage() == RangeEnd)
|
||||
else if (event.rangeStage() == RangeEnd && !stack.isEmpty())
|
||||
stack.pop();
|
||||
return true;
|
||||
} else if (isStateful(type)) {
|
||||
|
Reference in New Issue
Block a user