Author: tkreuzer
Date: Sat May 31 19:54:08 2008
New Revision: 33793
URL:
http://svn.reactos.org/svn/reactos?rev=33793&view=rev
Log:
IntGdiLineTo: the dc pen might be deleted, don't assert, instead fall back to
BLACK_PEN, fixes a crash when using FF
Modified:
trunk/reactos/subsystems/win32/win32k/objects/line.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/line.c [iso-8859-1] Sat May 31 19:54:08
2008
@@ -142,8 +142,12 @@
/* get BRUSHOBJ from current pen. */
PenBrushObj = PENOBJ_LockPen( Dc_Attr->hpen );
- /* FIXME - PenBrushObj can be NULL!!!! Don't assert here! */
- ASSERT(PenBrushObj);
+ if (!PenBrushObj)
+ {
+ /* default to BLACK_PEN */
+ PenBrushObj = PENOBJ_LockPen(NtGdiGetStockObject(BLACK_PEN));
+ ASSERT(PenBrushObj);
+ }
if (!(PenBrushObj->flAttrs & GDIBRUSH_IS_NULL))
{