From 4a1a7f965f0b8fa62de6a0e9778e9b9afe4db4f0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 28 Aug 2017 19:17:45 +0200 Subject: GRAPHICS: MACGUI: Do not crash when nothing was drawn yet --- graphics/macgui/mactext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'graphics/macgui/mactext.cpp') 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(); } -- cgit v1.2.3