diff options
author | Dominik Holland <dominik.holland@qt.io> | 2020-10-09 12:29:57 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@qt.io> | 2020-10-09 11:38:28 +0000 |
commit | db4b3641f5235be9a67967e0cf33512da2b50f6b (patch) | |
tree | c16e68022bf2b454170c3aaf1f89993f6a341e28 /src | |
parent | 0f87be729c6442c07ea3032ec0903e920a9c6ca6 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp index f1349d97d9..868b481a19 100644 --- a/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp +++ b/src/plugins/qmlprofiler/qmlprofilermodelmanager.cpp @@ -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)) { |