[PATCH] winex11.drv: Handle if cursor not found (Cpverity)
Marcus Meissner
marcus at jet.franken.de
Fri Dec 4 02:48:53 CST 2009
Hi,
Handle not found cursor gracefully.
Ciao, Marcus
---
dlls/winex11.drv/wintab.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/wintab.c b/dlls/winex11.drv/wintab.c
index c333539..7d7bfcc 100644
--- a/dlls/winex11.drv/wintab.c
+++ b/dlls/winex11.drv/wintab.c
@@ -991,6 +991,10 @@ int CDECL X11DRV_AttachEventQueueToTablet(HWND hOwner)
for (loop=0; loop < num_devices; loop ++)
if (strcmp(devices[loop].name, cursorNameA) == 0)
target = &devices[loop];
+ if (!target) {
+ WARN("Cursor Name %s not found in list of targets.\n", cursorNameA);
+ continue;
+ }
TRACE("Opening cursor %i id %i\n",cur_loop,(INT)target->id);
--
1.5.6
More information about the wine-patches
mailing list