Chromium Code Reviews| Index: remoting/host/event_executor_linux.cc |
| diff --git a/remoting/host/event_executor_linux.cc b/remoting/host/event_executor_linux.cc |
| index 140a2483fe948cdf00fa9d730d189a7c2a539560..314827e04633c91cc992f64f43497ec2ec14582e 100644 |
| --- a/remoting/host/event_executor_linux.cc |
| +++ b/remoting/host/event_executor_linux.cc |
| @@ -302,12 +302,16 @@ void EventExecutorLinux::InitMouseButtonMap() { |
| } |
| XFreeDeviceList(devices); |
| - if (!device_found) |
| + if (!device_found) { |
| LOG(ERROR) << "Cannot find XTest device."; |
|
Jamie
2012/09/25 18:15:46
Nit: If we're saying that this situation is expect
|
| + return; |
| + } |
| XDevice* device = XOpenDevice(display_, device_id); |
| - if (!device) |
| + if (!device) { |
| LOG(ERROR) << "Cannot open XTest device."; |
| + return; |
| + } |
| int num_device_buttons = XGetDeviceButtonMapping(display_, device, NULL, 0); |
| scoped_array<unsigned char> button_mapping(new unsigned char[num_buttons]); |