From a64a549b4c644d9dd0a5227419ec246cfceb45a2 Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <julliard@winehq.org>
Date: Fri, 15 Jul 2011 20:15:25 +0200
Subject: [PATCH] gdi32: Use the original StretchBlt rectangle if a DC doesn't
 have a visible region.

---
 dlls/gdi32/bitblt.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c
index a99efc7c246..da22507bbe1 100644
--- a/dlls/gdi32/bitblt.c
+++ b/dlls/gdi32/bitblt.c
@@ -89,8 +89,10 @@ static void get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
     if (rect.left > rect.right) { swap_ints( &rect.left, &rect.right ); rect.left++; rect.right++; }
     if (rect.top > rect.bottom) { swap_ints( &rect.top, &rect.bottom ); rect.top++; rect.bottom++; }
 
-    get_clip_box( dc_dst, &clip );
-    intersect_rect( &dst->visrect, &rect, &clip );
+    if (get_clip_box( dc_dst, &clip ))
+        intersect_rect( &dst->visrect, &rect, &clip );
+    else
+        dst->visrect = rect;
 
     /* get the source visible rectangle */