Alexandre Julliard : winex11: Make sure we create valid bitmaps even for a 1x1 mask.

Alexandre Julliard julliard at winehq.org
Wed Nov 16 12:46:47 CST 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Nov 16 18:21:21 2011 +0100

winex11: Make sure we create valid bitmaps even for a 1x1 mask.

---

 dlls/winex11.drv/mouse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index d4249f4..7eabd1e 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -1161,7 +1161,7 @@ static Cursor create_cursor( HANDLE handle )
 #endif
 
     GetObjectW( info.hbmMask, sizeof(bm), &bm );
-    if (!info.hbmColor) bm.bmHeight /= 2;
+    if (!info.hbmColor) bm.bmHeight = max( 1, bm.bmHeight / 2 );
 
     /* make sure hotspot is valid */
     if (info.xHotspot >= bm.bmWidth || info.yHotspot >= bm.bmHeight)




More information about the wine-cvs mailing list