From 58a30b9146ba1658dac1644d90cb02a3c5f54a75 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 5 Aug 2017 00:24:28 +0200 Subject: GRAPHICS: MACGUI: Do not crash when window callback is null --- graphics/macgui/macwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'graphics/macgui/macwindow.cpp') diff --git a/graphics/macgui/macwindow.cpp b/graphics/macgui/macwindow.cpp index 0fce19e482..227f789d30 100644 --- a/graphics/macgui/macwindow.cpp +++ b/graphics/macgui/macwindow.cpp @@ -494,7 +494,10 @@ bool MacWindow::processEvent(Common::Event &event) { return false; } - return (*_callback)(click, event, _dataPtr); + if (_callback) + return (*_callback)(click, event, _dataPtr); + else + return false; } } // End of namespace Wage -- cgit v1.2.3