Index: base/message_pump_x.cc |
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc |
index 53c6d72b57389255b194b42f3f65c28a7d7de30a..13adb37837b4e9b529d8212102329ae61b787cbc 100644 |
--- a/base/message_pump_x.cc |
+++ b/base/message_pump_x.cc |
@@ -167,7 +167,7 @@ bool MessagePumpX::RunOnce(GMainContext* context, bool block) { |
MessagePumpDispatcher* dispatcher = |
GetDispatcher() ? GetDispatcher() : g_default_dispatcher; |
- if (!display || !dispatcher) |
+ if (!display) |
return g_main_context_iteration(context, block); |
// In the general case, we want to handle all pending events before running |
@@ -175,7 +175,7 @@ bool MessagePumpX::RunOnce(GMainContext* context, bool block) { |
while (XPending(display)) { |
XEvent xev; |
XNextEvent(display, &xev); |
- if (ProcessXEvent(dispatcher, &xev)) |
+ if (dispatcher && ProcessXEvent(dispatcher, &xev)) |
return true; |
} |