aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-24 15:55:11 +0100
committerEugene Sandulenko2019-11-24 15:57:08 +0100
commit0bbfe624be0b7fb01a1e94f37e00b9a448651f7f (patch)
tree22f100e65de3b5b412bbffbbb9da11fb8d985537 /graphics/macgui
parent8bb261abbae782edcb5f9ff10fbadd62a97fe7bc (diff)
downloadscummvm-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.cpp6
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;