mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-24 03:24:50 +00:00
GRAPHICS: MACGUI: Fix crash on backspace in MacTextWindow input
This commit is contained in:
parent
5149226255
commit
da9e02cebb
@ -179,7 +179,7 @@ void MacTextWindow::drawInput() {
|
||||
// And add new input line to the text
|
||||
appendText(_inputText, _font);
|
||||
|
||||
_cursorX = _fontRef->getStringWidth(text[_inputTextHeight - 1]);
|
||||
_cursorX = _inputText.empty() ? 0 : _fontRef->getStringWidth(text[_inputTextHeight - 1]);
|
||||
|
||||
updateCursorPos();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user