aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/gui-manager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 20c6d3fa13..ef37990dfc 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -331,10 +331,13 @@ void GuiManager::runLoop() {
//
// This hopefully fixes strange behavior/crashes with pop-up widgets. (Most easily
// triggered in 3x mode or when running ScummVM under Valgrind.)
- if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED)
- continue;
-
+ if (activeDialog != getTopDialog() && event.type != Common::EVENT_SCREEN_CHANGED) {
+ processEvent(event, getTopDialog());
+ continue;
+ }
+
processEvent(event, activeDialog);
+
if (event.type == Common::EVENT_MOUSEMOVE) {
tooltipCheck = true;
@@ -512,6 +515,8 @@ void GuiManager::screenChange() {
}
void GuiManager::processEvent(const Common::Event &event, Dialog *const activeDialog) {
+ if (activeDialog == 0)
+ return;
int button;
uint32 time;
Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y);