Crash in BeginPaint running Sams Photofact index, a free VB app
Dmitry Timoshkov
dmitry at baikal.ru
Mon Apr 28 05:19:51 CDT 2003
"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)
Attached patch should help a bit.
--
Dmitry.
-------------- next part --------------
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;
More information about the wine-patches
mailing list