dont delete hrgnClip until we are dont using it.

Aric Stewart aric at codeweavers.com
Wed Mar 7 00:31:19 CST 2007


Thanks to Peter Oberndorfer for noticing this.
---
  dlls/user32/painting.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/user32/painting.c b/dlls/user32/painting.c
index 5c70b2a..c361610 100644
--- a/dlls/user32/painting.c
+++ b/dlls/user32/painting.c
@@ -869,7 +869,6 @@ INT WINAPI ScrollWindowEx( HWND hwnd, IN
             if( !bOwnRgn)
                 CombineRgn( hrgnWinupd, hrgnWinupd, hrgnTemp, RGN_OR );
             RedrawWindow( hwnd, NULL, hrgnTemp, rdw_flags);
-            DeleteObject( hrgnClip );
 
            /* Catch the case where the scolling amount exceeds the size of the
             * original window. This generated a second update area that is the
@@ -889,6 +888,7 @@ INT WINAPI ScrollWindowEx( HWND hwnd, IN
                 if( !bOwnRgn)
                     CombineRgn( hrgnWinupd, hrgnWinupd, hrgnTemp, RGN_OR );
             }
+            DeleteObject( hrgnClip );
         }
         DeleteObject( hrgnTemp );
     } else {


More information about the wine-patches mailing list