Fixed an issue where pressing the 'Clear' button in the text editor and then entering some value in the input field crashed the application

This commit is contained in:
Leon Styhre 2024-09-29 20:53:40 +02:00
parent ed1d15dbac
commit 45fc13a43e

View file

@ -344,6 +344,9 @@ void TextEditComponent::onTextChanged()
if (mCursor > static_cast<int>(mText.length()))
mCursor = static_cast<int>(mText.length());
if (mCursorShapedText > static_cast<int>(Utils::String::unicodeLength(mText)))
mCursorShapedText = static_cast<int>(Utils::String::unicodeLength(mText));
}
void TextEditComponent::onCursorChanged()