Marcus Meissner : winex11.drv: Handle if cursor not found (Cpverity).

Alexandre Julliard julliard at winehq.org
Fri Dec 4 09:11:28 CST 2009


Module: wine
Branch: master
Commit: 478592cd3d709f16de1c6a4feb54adbbab9ba3f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=478592cd3d709f16de1c6a4feb54adbbab9ba3f1

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Fri Dec  4 09:48:53 2009 +0100

winex11.drv: Handle if cursor not found (Cpverity).

---

 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);
 




More information about the wine-cvs mailing list