QmlDesigner: Fix crash in Expression Builder

Change-Id: I8ef783c1407f06aea630ce111b3d4f02e195eff5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2023-09-13 16:34:30 +02:00
committed by Henning Gründl
parent 83bf9df043
commit 1ae4b05599

View File

@@ -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;