aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/macgui/mactext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 0201b19abd..895d49e450 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -277,7 +277,9 @@ int MacText::getLineWidth(int line, bool enforce) {
int height = 0;
for (uint i = 0; i < _textLines[line].chunks.size(); i++) {
- width += _textLines[line].chunks[i].getFont()->getStringWidth(_textLines[line].chunks[i].text);
+ if (!_textLines[line].chunks[i].text.empty())
+ width += _textLines[line].chunks[i].getFont()->getStringWidth(_textLines[line].chunks[i].text);
+
height = MAX(height, _textLines[line].chunks[i].getFont()->getFontHeight());
}