diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc index 30996de0..41201924 100644 --- a/otk/eventdispatcher.cc +++ b/otk/eventdispatcher.cc @@ -44,10 +44,10 @@ void OtkEventDispatcher::dispatchEvents(void) XNextEvent(OBDisplay::display, &e); it = _map.find(e.xany.window); - if (it == _map.end()) - handler = _fallback; - else + if (it != _map.end()) handler = it->second; + else + handler = _fallback; if (handler) handler->handle(e);