[WIN32SS][FONT] Add some assertions (#1098)

This commit is contained in:
Katayama Hirofumi MZ 2018-12-06 12:47:02 +09:00 committed by GitHub
parent 93757884c1
commit e90954304d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -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);

View file

@ -1631,6 +1631,7 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
PLFONT plfont;
LOGFONTW *plf;
ASSERT(lf);
plfont = LFONT_AllocFontWithHandle();
if (!plfont)
{