Don't attempt to navigate to a component that doesn't exist

Check for the size of our component list before trying to access it.

BUG: 516107
FIXED-IN: 26.04
This commit is contained in:
Joshua Goins
2026-02-16 13:23:59 -05:00
parent 7e6b79d5d4
commit 942221b59f

View File

@@ -571,6 +571,9 @@ void ChatBarMessageContentModel::handleBlockTransition(bool up)
setFocusRow(insertRow);
return;
}
if (atEdge) {
return;
}
const auto nextRow = currentRow + (up ? -1 : 1);
const auto nextNotText = m_components[nextRow].type != MessageComponentType::Text;