Commit 4ecefc68 authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Fix crash in range model

The first element in the expandedRowTypes is always -1 as that is the
empty row. Don't try to retrieve its type.

Change-Id: I1a4b59e0de6638201485d503e3be05afddf625fb
Reviewed-by: default avatarKai Koehne <>
parent 981bb850
......@@ -371,7 +371,7 @@ int RangeTimelineModel::getEventIdForLocation(const QString &filename, int line,
// if this is called from v8 view, we don't have the column number, it will be -1
const QVector<QmlProfilerDataModel::QmlEventTypeData> &types =
for (int i = 0; i < d->expandedRowTypes.size(); ++i) {
for (int i = 1; i < d->expandedRowTypes.size(); ++i) {
int typeId = d->expandedRowTypes[i];
const QmlProfilerDataModel::QmlEventTypeData &eventData = types[typeId];
if (eventData.location.filename == filename &&
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment