diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-13 09:04:09 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-13 19:06:06 +0200 |
commit | 4d2f743baaf6869693f4540df668e1b998154785 (patch) | |
tree | ba712b420e5d299be28faf641d30585ae8dce4e7 /src/qml/types | |
parent | 0c5a9ff9876cb1af53317720d1de8baae003e21d (diff) | |
parent | 0932a59971f606f07b41da19f3974d51b7008180 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp
Change-Id: I26d6435a29cac3840bb567ade5149c2562a94bf9
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 8c676bcec0..f7fdbf0d80 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -398,6 +398,8 @@ void ListModel::updateCacheIndices() QVariant ListModel::getProperty(int elementIndex, int roleIndex, const QQmlListModel *owner, QV4::ExecutionEngine *eng) { + if (roleIndex >= m_layout->roleCount()) + return QVariant(); ListElement *e = elements[elementIndex]; const ListLayout::Role &r = m_layout->getExistingRole(roleIndex); return e->getProperty(r, owner, eng); |