Roderick Colenbrander : winex11: Fix a null pointer crash when XRender isn' t around.

Alexandre Julliard julliard at winehq.org
Tue Dec 22 09:58:57 CST 2009


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

Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date:   Mon Dec 21 16:45:13 2009 +0100

winex11: Fix a null pointer crash when XRender isn't around.

---

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

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 1f5e512..214be7b 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -2093,7 +2093,8 @@ void X11DRV_XRender_CopyBrush(X11DRV_PDEVICE *physDev, X_PHYSBITMAP *physBitmap,
     physDev->brush.pixmap = XCreatePixmap(gdi_display, root_window, width, height, depth);
 
     /* Use XCopyArea when the physBitmap and brush.pixmap have the same format. */
-    if(physBitmap->pixmap_depth == 1 || src_format->format == dst_format->format)
+    if( (physBitmap->pixmap_depth == 1) || (!X11DRV_XRender_Installed && physDev->depth == physBitmap->pixmap_depth) ||
+        (src_format->format == dst_format->format) )
     {
         XCopyArea( gdi_display, physBitmap->pixmap, physDev->brush.pixmap,
                    get_bitmap_gc(physBitmap->pixmap_depth), 0, 0, width, height, 0, 0 );




More information about the wine-cvs mailing list