diff --git a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp index 7f0db656005..838e1d587dd 100644 --- a/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp +++ b/src/plugins/qmldesigner/components/connectioneditor/connectionmodel.cpp @@ -1815,7 +1815,7 @@ bool ConditionListModel::operatorAllowed(int cursorPosition) int tokenIdx = cursorPosition - 1; - if (tokenIdx >= 0 && m_tokens[tokenIdx].type != Operator) + if (tokenIdx >= 0 && tokenIdx < m_tokens.length() && m_tokens[tokenIdx].type != Operator) return true; return false;