user32: Fix to succeed reliably in test where it works by accident.

Jan Zerebecki jan.wine at zerebecki.de
Mon Apr 16 02:54:14 CDT 2007


---

In the user32 cursoricon test on line 331 CreateIconIndirect
currently only returns 0 because GlobalAlloc16 returns 0.
---
If this patch is rejected from inclusion, please tell me why, as
I would have to ask anyway.

 dlls/user32/cursoricon.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 38e2ac6..6bfe2e9 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -1796,6 +1796,9 @@ HICON WINAPI CreateIconIndirect(PICONINFO iconinfo)
            iconinfo->hbmColor, iconinfo->hbmMask,
            iconinfo->xHotspot, iconinfo->yHotspot, iconinfo->fIcon);
 
+    if (!iconinfo->hbmMask) {
+        return 0;
+    }
     if (iconinfo->hbmColor)
     {
         GetObjectW( iconinfo->hbmColor, sizeof(bmpXor), &bmpXor );



More information about the wine-patches mailing list