ChangeLog: * windows/painting.c Fix stupid use of unlocked window pointer
Index: windows/painting.c =================================================================== RCS file: /home/wine/wine/windows/painting.c,v retrieving revision 1.64 diff -u -r1.64 painting.c --- windows/painting.c 2001/11/30 23:13:22 1.64 +++ windows/painting.c 2001/12/11 22:25:53 @@ -308,6 +308,7 @@ RECT clipRect, clientRect; HWND full_handle; WND *wndPtr; + INT offw, offh; if (!(full_handle = WIN_IsCurrentThread( hwnd ))) { @@ -341,6 +342,8 @@ wndPtr->hrgnUpdate = 0; wndPtr->flags &= ~WIN_INTERNAL_PAINT; + offw = wndPtr->rectWindow.left - wndPtr->rectClient.left; + offh = wndPtr->rectWindow.top - wndPtr->rectClient.top; WIN_ReleaseWndPtr(wndPtr); HideCaret( hwnd ); @@ -358,8 +361,7 @@ else { if( hrgnUpdate ) /* convert to client coordinates */ - OffsetRgn( hrgnUpdate, wndPtr->rectWindow.left - wndPtr->rectClient.left, - wndPtr->rectWindow.top - wndPtr->rectClient.top ); + OffsetRgn( hrgnUpdate, offw, offh); lps->hdc = GetDCEx(hwnd, hrgnUpdate, DCX_INTERSECTRGN | DCX_WINDOWPAINT | DCX_USESTYLE | (bIcon ? DCX_WINDOW : 0) ); /* ReleaseDC() in EndPaint() will delete the region */