diff options
author | Eugene Sandulenko | 2019-11-24 15:55:11 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2019-11-24 15:57:08 +0100 |
commit | 0bbfe624be0b7fb01a1e94f37e00b9a448651f7f (patch) | |
tree | 22f100e65de3b5b412bbffbbb9da11fb8d985537 /graphics/macgui | |
parent | 8bb261abbae782edcb5f9ff10fbadd62a97fe7bc (diff) | |
download | scummvm-rg350-0bbfe624be0b7fb01a1e94f37e00b9a448651f7f.tar.gz scummvm-rg350-0bbfe624be0b7fb01a1e94f37e00b9a448651f7f.tar.bz2 scummvm-rg350-0bbfe624be0b7fb01a1e94f37e00b9a448651f7f.zip |
MACGUI: Do not recalc empty text
Diffstat (limited to 'graphics/macgui')
-rw-r--r-- | graphics/macgui/mactext.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp index 9a5de39dd2..1c80e55358 100644 --- a/graphics/macgui/mactext.cpp +++ b/graphics/macgui/mactext.cpp @@ -295,6 +295,9 @@ void MacText::render() { } void MacText::render(int from, int to) { + if (_textLines.empty()) + return; + reallocSurface(); from = MAX<int>(0, from); @@ -373,6 +376,9 @@ void MacText::setInterLinear(int interLinear) { } void MacText::recalcDims() { + if (_textLines.empty()) + return; + int y = 0; _textMaxWidth = 0; |