winex11.drv: Handle a failure of XcursorImageCreate.

Dmitry Timoshkov dmitry at codeweavers.com
Wed Aug 12 03:16:48 CDT 2009


This patch should help to avoid the crash reported in the bug 19682.
---
 dlls/winex11.drv/mouse.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 5282412..60351e5 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -486,6 +486,8 @@ static XcursorImage *create_cursor_image( CURSORICONINFO *ptr )
     xor_ptr = xor_bits = and_ptr + and_size;
 
     image = pXcursorImageCreate( ptr->nWidth, ptr->nHeight );
+    if (!image) return NULL;
+
     pixel_ptr = image->pixels;
 
     alpha_zero = check_alpha_zero(ptr, xor_bits);
-- 
1.6.3.3




More information about the wine-patches mailing list