aboutsummaryrefslogtreecommitdiff
path: root/graphics/macgui/mactext.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2017-08-28 19:17:45 +0200
committerEugene Sandulenko2017-08-28 19:17:45 +0200
commit4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0 (patch)
treee4b4a5059ee0c6972d475278e8688da931d4f481 /graphics/macgui/mactext.cpp
parent90aca034dfb9a32fa6a5341e15438808b85fed29 (diff)
downloadscummvm-rg350-4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0.tar.gz
scummvm-rg350-4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0.tar.bz2
scummvm-rg350-4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0.zip
GRAPHICS: MACGUI: Do not crash when nothing was drawn yet
Diffstat (limited to 'graphics/macgui/mactext.cpp')
-rw-r--r--graphics/macgui/mactext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/macgui/mactext.cpp b/graphics/macgui/mactext.cpp
index 244988b3d6..69e2dce932 100644
--- a/graphics/macgui/mactext.cpp
+++ b/graphics/macgui/mactext.cpp
@@ -417,7 +417,8 @@ void MacText::clearText() {
_textLines.clear();
_str.clear();
- _surface->clear(_bgcolor);
+ if (_surface)
+ _surface->clear(_bgcolor);
recalcDims();
}