From 1ae4b0559921e44079cd5d780b2f882d4945e424 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Wed, 13 Sep 2023 16:34:30 +0200 Subject: [PATCH] QmlDesigner: Fix crash in Expression Builder Change-Id: I8ef783c1407f06aea630ce111b3d4f02e195eff5 Reviewed-by: Thomas Hartmann --- .../qmldesigner/components/connectioneditor/connectionmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;