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

This commit is contained in:
Alexandre Julliard 2011-11-16 18:21:21 +01:00
parent 3bbb208f8e
commit bd44f10496

View file

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