From: Katayama Hirofumi MZ Date: Thu, 6 Dec 2018 03:47:02 +0000 (+0900) Subject: [WIN32SS][FONT] Add some assertions (#1098) X-Git-Tag: 0.4.12-dev~29 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=e90954304d09bc71dd9354e5714bbc8e5a3f3a2e [WIN32SS][FONT] Add some assertions (#1098) --- diff --git a/win32ss/gdi/ntgdi/font.c b/win32ss/gdi/ntgdi/font.c index ecf16c6baf5..d106e57ac0d 100644 --- a/win32ss/gdi/ntgdi/font.c +++ b/win32ss/gdi/ntgdi/font.c @@ -293,7 +293,10 @@ FASTCALL FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer) { ULONG cjMaxSize; - ENUMLOGFONTEXDVW *plf = &plfont->logfont; + ENUMLOGFONTEXDVW *plf; + + ASSERT(plfont); + plf = &plfont->logfont; if (!(plfont->fl & TEXTOBJECT_INIT)) { @@ -1081,6 +1084,7 @@ NtGdiGetRealizationInfo( } pdcattr = pDc->pdcattr; pTextObj = RealizeFontInit(pdcattr->hlfntNew); + ASSERT(pTextObj != NULL); pFontGdi = ObjToGDI(pTextObj->Font, FONT); TEXTOBJ_UnlockText(pTextObj); DC_UnlockDc(pDc); diff --git a/win32ss/gdi/ntgdi/freetype.c b/win32ss/gdi/ntgdi/freetype.c index d6aafb56796..fb823d48d12 100644 --- a/win32ss/gdi/ntgdi/freetype.c +++ b/win32ss/gdi/ntgdi/freetype.c @@ -1631,6 +1631,7 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont) PLFONT plfont; LOGFONTW *plf; + ASSERT(lf); plfont = LFONT_AllocFontWithHandle(); if (!plfont) {