Alexandre Julliard : winex11.drv: Don' t fetch the atom for a null device type.
Alexandre Julliard
julliard at winehq.org
Thu Jan 17 08:48:35 CST 2008
Module: wine
Branch: master
Commit: c975876cb9b498d3d4b2283b2e0b92c91141b2ae
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c975876cb9b498d3d4b2283b2e0b92c91141b2ae
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 17 15:23:37 2008 +0100
winex11.drv: Don't fetch the atom for a null device type.
---
dlls/winex11.drv/wintab.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index bb91de8..d7bdb6a 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -514,10 +514,10 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
for (loop=0; loop < num_devices; loop++)
{
int class_loop;
- char *device_type = XGetAtomName(data->display, devices[loop].type);
+ char *device_type = devices[loop].type ? XGetAtomName(data->display, devices[loop].type) : NULL;
TRACE("Device %i: [id %d|name %s|type %s|num_classes %d|use %s]\n",
- loop, (int) devices[loop].id, devices[loop].name, device_type,
+ loop, (int) devices[loop].id, devices[loop].name, device_type ? device_type : "",
devices[loop].num_classes,
devices[loop].use == IsXKeyboard ? "IsXKeyboard" :
devices[loop].use == IsXPointer ? "IsXPointer" :
@@ -580,7 +580,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
if (! IS_TABLET_CURSOR(target->name, device_type))
{
WARN("Skipping device %d [name %s|type %s]; not apparently a tablet cursor type device\n",
- loop, devices[loop].name, device_type);
+ loop, devices[loop].name, device_type ? device_type : "");
XFree(device_type);
cursor_target --;
continue;
More information about the wine-cvs
mailing list