Author: tkreuzer
Date: Mon Jul 30 11:09:31 2012
New Revision: 56994
URL:
http://svn.reactos.org/svn/reactos?rev=56994&view=rev
Log:
[WIN32K]
Check if the dc surface is NULL instead of ASSERTing
Modified:
trunk/reactos/win32ss/gdi/ntgdi/line.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/line.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/line.c?r…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/line.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/line.c [iso-8859-1] Mon Jul 30 11:09:31 2012
@@ -233,6 +233,12 @@
LONG i;
PDC_ATTR pdcattr = dc->pdcattr;
+ psurf = dc->dclevel.pSurface;
+ if (!psurf)
+ {
+ return FALSE;
+ }
+
if (PATH_IsPathOpen(dc->dclevel))
return PATH_Polyline(dc, pt, Count);
@@ -254,11 +260,6 @@
Points = EngAllocMem(0, Count * sizeof(POINT), GDITAG_TEMP);
if (Points != NULL)
{
- psurf = dc->dclevel.pSurface;
- /* FIXME: psurf can be NULL!!!!
- Don't assert but handle this case gracefully! */
- ASSERT(psurf);
-
RtlCopyMemory(Points, pt, Count * sizeof(POINT));
IntLPtoDP(dc, Points, Count);