fix crash in painting.c

Rein Klazes wijn at wanadoo.nl
Wed Dec 8 05:20:01 CST 2004


hi,

Several app's crash with the re-organized region code.

Changelog:
	dlls/user	: painting.c
	GetUpdateRect can be called with rect is NULL.

Rein.
-------------- next part --------------
--- wine/dlls/user/painting.c	2004-12-08 08:50:40.000000000 +0100
+++ mywine/dlls/user/painting.c	2004-12-08 12:07:33.000000000 +0100
@@ -534,12 +534,12 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LP
 
     if (!(update_rgn = send_ncpaint( hwnd, NULL, &flags ))) return FALSE;
 
-    GetRgnBox( update_rgn, rect );
+    if (rect) GetRgnBox( update_rgn, rect );
 
     send_erase( hwnd, flags, update_rgn, &dummy, &hdc );
     if (hdc)
     {
-        DPtoLP( hdc, (LPPOINT)rect, 2 );
+        if (rect) DPtoLP( hdc, (LPPOINT)rect, 2 );
         ReleaseDC( hwnd, hdc );
     }
     else DeleteObject( update_rgn );


More information about the wine-patches mailing list