Handle SetCursor(NULL)

Günther Brammer GBrammer at gmx.de
Mon Jan 28 04:27:40 CST 2008


This fixes Bug 881.

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 7c197ed..90d5af1 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -1462,8 +1462,9 @@ HCURSOR WINAPI SetCursor( HCURSOR hCursor /* [in] Handle of cursor to show */ )
     struct user_thread_info *thread_info = get_user_thread_info();
     HCURSOR hOldCursor;
 
-    if (hCursor == thread_info->cursor) return hCursor;  /* No change */
-    TRACE("%p\n", hCursor);
+    if (hCursor && hCursor == thread_info->cursor) return hCursor;  /* No change */
+    TRACE("%p (was %p)\n", hCursor, thread_info->cursor);
+	
     hOldCursor = thread_info->cursor;
     thread_info->cursor = hCursor;
     /* Change the cursor shape only if it is visible */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080128/834d8b62/attachment.pgp 


More information about the wine-patches mailing list