Chromium Code Reviews| Index: ui/events/x/touch_factory_x11.cc |
| diff --git a/ui/events/x/touch_factory_x11.cc b/ui/events/x/touch_factory_x11.cc |
| index b3cd4dd0617d644c6bcf5849d8a257fe452dd4e9..7472061d3745db8e1b37327475357b26fc5abd93 100644 |
| --- a/ui/events/x/touch_factory_x11.cc |
| +++ b/ui/events/x/touch_factory_x11.cc |
| @@ -93,12 +93,13 @@ void TouchFactory::UpdateDeviceList(Display* display) { |
| DeviceListCacheX::GetInstance()->GetXDeviceList(display); |
| for (int i = 0; i < dev_list.count; i++) { |
| if (dev_list[i].type) { |
| - XScopedString devtype(XGetAtomName(display, dev_list[i].type)); |
| - if (devtype.string() && !strcmp(devtype.string(), XI_TOUCHSCREEN)) { |
| + char* devtype = XGetAtomName(display, dev_list[i].type); |
| + if (devtype && !strcmp(devtype, XI_TOUCHSCREEN)) { |
| touch_device_lookup_[dev_list[i].id] = true; |
| touch_device_list_[dev_list[i].id] = false; |
| touch_device_available_ = true; |
| } |
| + XFree(devtype); |
| } |
|
sadrul
2013/10/31 15:30:36
Can you do this like the following instead:
dev
|
| } |
| #endif |