Crash in BeginPaint running Sams Photofact index, a free VB app
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Mon Apr 28 07:58:18 CDT 2003
>>>>> "Dmitry" == Dmitry Timoshkov <dmitry at baikal.ru> writes:
Dmitry> "Dan Kegel" <dank at kegel.com> wrote:
>> Backtrace: =>0 0x409e5873 (BeginPaint+0x9f(hwnd=0x10029, lps=0x0)
>> [painting.c:200] in user32.dll.so) (ebp=40892bc4)
Dmitry> Attached patch should help a bit.
Dmitry> -- Dmitry. Protect BeginPaint and EndPaint from lps being NULL.
Dmitry> --- cvs/hq/wine/dlls/user/painting.c Thu Jan 09 03:41:30 2003
Dmitry> +++ painting.c Mon Apr 28 10:15:46 2003 @@ -159,6 +159,8 @@ HWND
Dmitry> full_handle; WND *wndPtr;
Dmitry> + if (!lps) return 0; + if (!(full_handle = WIN_IsCurrentThread(
Dmitry> hwnd ))) { if (IsWindow(hwnd)) @@ -239,6 +241,8 @@ */ BOOL
Dmitry> WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps ) { + if
Dmitry> (!lps) return FALSE; + ReleaseDC( hwnd, lps->hdc ); ShowCaret(
Dmitry> hwnd ); return TRUE;
Is lps==NULL an argument that BeginPaint() and EndPaint() should cope with or
is it a result for errors hidden deeper?
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
More information about the wine-devel
mailing list