From 99cbcf396bc9cdf9bc1359ef177a8e714b4c9d34 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 28 Nov 2015 15:48:57 +0000 Subject: [PATCH] [WIN32K] Check for dc->dclevel.pSurface == NULL in IntGdiPolygon. CORE-10377 #resolve svn path=/trunk/; revision=70179 --- reactos/win32ss/gdi/ntgdi/fillshap.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/fillshap.c b/reactos/win32ss/gdi/ntgdi/fillshap.c index db16f01ea86..fa9c27a98ac 100644 --- a/reactos/win32ss/gdi/ntgdi/fillshap.c +++ b/reactos/win32ss/gdi/ntgdi/fillshap.c @@ -81,8 +81,11 @@ IntGdiPolygon(PDC dc, pbrFill = dc->dclevel.pbrFill; pbrLine = dc->dclevel.pbrLine; psurf = dc->dclevel.pSurface; - /* FIXME: psurf can be NULL!!!! don't assert but handle this case gracefully! */ - ASSERT(psurf); + if (psurf == NULL) + { + /* Memory DC without a bitmap selected, nothing to do. */ + return TRUE; + } /* Now fill the polygon with the current fill brush. */ if (!(pbrFill->flAttrs & BR_IS_NULL))