Re: Crash in BeginPaint running Sams Photofact index, a free VB app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Dan Kegel" <dank@kegel.com> wrote:

> Backtrace:
> =>0 0x409e5873 (BeginPaint+0x9f(hwnd=0x10029, lps=0x0) [painting.c:200] in user32.dll.so) (ebp=40892bc4)

Attached patch should help a bit.

-- 
Dmitry.
Protect BeginPaint and EndPaint from lps being NULL.

--- cvs/hq/wine/dlls/user/painting.c	Thu Jan 09 03:41:30 2003
+++ painting.c	Mon Apr 28 10:15:46 2003
@@ -159,6 +159,8 @@
     HWND full_handle;
     WND *wndPtr;
 
+    if (!lps) return 0;
+
     if (!(full_handle = WIN_IsCurrentThread( hwnd )))
     {
         if (IsWindow(hwnd))
@@ -239,6 +241,8 @@
  */
 BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
 {
+    if (!lps) return FALSE;
+
     ReleaseDC( hwnd, lps->hdc );
     ShowCaret( hwnd );
     return TRUE;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux