diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index a83d41b59..4a7a574a8 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -122,6 +122,11 @@ void CHintBox::init(const char * const Caption, const char * const Text, const i if (nw > width) width = nw; } + + /* make sure we don't overflow the usable area */ + if (nw > (int)CFrameBuffer::getInstance()->getScreenWidth()) + width = CFrameBuffer::getInstance()->getScreenWidth(); + window = NULL; }