diff --git a/source/gui/GUItext.cpp b/source/gui/GUItext.cpp index f722ffa82b..874e4a60e6 100644 --- a/source/gui/GUItext.cpp +++ b/source/gui/GUItext.cpp @@ -83,7 +83,7 @@ void CGUIString::GenerateTextCall(const CGUI *pGUI, // it's in the end of one word, and the icon // should really belong to the beginning of the next one - if (_to == to && to >= 1) + if (_to == to && to >= 1 && to < m_RawString.length()) { if (m_RawString[to-1] == ' ' || m_RawString[to-1] == '-' ||