winex11: Don't access the source rectangle in PutImage until needed.

This commit is contained in:
Alexandre Julliard 2011-07-15 19:57:31 +02:00
parent a64a549b4c
commit 55bc21938f
1 changed files with 3 additions and 2 deletions

View File

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