Alexandre Julliard : winex11: Check for failure to convert the brush bitmap to X11.

Alexandre Julliard julliard at winehq.org
Fri Jan 27 11:30:40 CST 2012


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jan 27 11:10:38 2012 +0100

winex11: Check for failure to convert the brush bitmap to X11.

---

 dlls/winex11.drv/brush.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/dlls/winex11.drv/brush.c b/dlls/winex11.drv/brush.c
index 216c142..ea41f8a 100644
--- a/dlls/winex11.drv/brush.c
+++ b/dlls/winex11.drv/brush.c
@@ -269,6 +269,11 @@ HBITMAP create_brush_bitmap( X11DRV_PDEVICE *physDev, const struct brush_pattern
     memdc = CreateCompatibleDC( physDev->dev.hdc );
     SelectObject( memdc, bitmap );
     DeleteDC( memdc );
+    if (!X11DRV_get_phys_bitmap( bitmap ))
+    {
+        DeleteObject( bitmap );
+        return 0;
+    }
 
     SetDIBits( physDev->dev.hdc, bitmap, 0, abs(info->bmiHeader.biHeight),
                pattern->bits.ptr, info, pattern->usage );




More information about the wine-cvs mailing list