diff options
Diffstat (limited to 'graphics/macgui/mactextwindow.cpp')
-rw-r--r-- | graphics/macgui/mactextwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/macgui/mactextwindow.cpp b/graphics/macgui/mactextwindow.cpp index d7c97c033b..9f8a2e2028 100644 --- a/graphics/macgui/mactextwindow.cpp +++ b/graphics/macgui/mactextwindow.cpp @@ -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(); } |