From 55bc21938f5109c8bec7e59acbdcfb55b6fb4748 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 15 Jul 2011 19:57:31 +0200 Subject: [PATCH] winex11: Don't access the source rectangle in PutImage until needed. --- dlls/winex11.drv/bitblt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 880d71ff740..73ab7e83ca4 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1802,8 +1802,6 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str struct gdi_image_bits dst_bits; const XPixmapFormatValues *format; const ColorShifts *color_shifts; - int width = rect->right - rect->left; - int height = rect->bottom - rect->top; if (hbitmap) { @@ -1866,6 +1864,9 @@ DWORD X11DRV_PutImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, const str if (!ret) { + int width = rect->right - rect->left; + int height = rect->bottom - rect->top; + image->data = dst_bits.ptr; if (bitmap) {