diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/message_pump_x.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/message_pump_x.cc b/base/message_pump_x.cc index 8c4dd2c..ddf0e35 100644 --- a/base/message_pump_x.cc +++ b/base/message_pump_x.cc @@ -147,7 +147,9 @@ bool MessagePumpX::HasXInput2() { void MessagePumpX::InitXSource() { DCHECK(!x_source_); GPollFD* x_poll = new GPollFD(); - x_poll->fd = ConnectionNumber(GetDefaultXDisplay()); + Display* display = GetDefaultXDisplay(); + CHECK(display) << "Unable to get connection to X server"; + x_poll->fd = ConnectionNumber(display); x_poll->events = G_IO_IN; x_source_ = g_source_new(&XSourceFuncs, sizeof(GSource)); |