mirror of
https://github.com/reactos/reactos.git
synced 2025-05-02 04:05:56 +00:00
[WIN32SS][FONT] Add some assertions (#1098)
This commit is contained in:
parent
93757884c1
commit
e90954304d
2 changed files with 6 additions and 1 deletions
|
@ -293,7 +293,10 @@ FASTCALL
|
||||||
FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer)
|
FontGetObject(PTEXTOBJ plfont, ULONG cjBuffer, PVOID pvBuffer)
|
||||||
{
|
{
|
||||||
ULONG cjMaxSize;
|
ULONG cjMaxSize;
|
||||||
ENUMLOGFONTEXDVW *plf = &plfont->logfont;
|
ENUMLOGFONTEXDVW *plf;
|
||||||
|
|
||||||
|
ASSERT(plfont);
|
||||||
|
plf = &plfont->logfont;
|
||||||
|
|
||||||
if (!(plfont->fl & TEXTOBJECT_INIT))
|
if (!(plfont->fl & TEXTOBJECT_INIT))
|
||||||
{
|
{
|
||||||
|
@ -1081,6 +1084,7 @@ NtGdiGetRealizationInfo(
|
||||||
}
|
}
|
||||||
pdcattr = pDc->pdcattr;
|
pdcattr = pDc->pdcattr;
|
||||||
pTextObj = RealizeFontInit(pdcattr->hlfntNew);
|
pTextObj = RealizeFontInit(pdcattr->hlfntNew);
|
||||||
|
ASSERT(pTextObj != NULL);
|
||||||
pFontGdi = ObjToGDI(pTextObj->Font, FONT);
|
pFontGdi = ObjToGDI(pTextObj->Font, FONT);
|
||||||
TEXTOBJ_UnlockText(pTextObj);
|
TEXTOBJ_UnlockText(pTextObj);
|
||||||
DC_UnlockDc(pDc);
|
DC_UnlockDc(pDc);
|
||||||
|
|
|
@ -1631,6 +1631,7 @@ TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
|
||||||
PLFONT plfont;
|
PLFONT plfont;
|
||||||
LOGFONTW *plf;
|
LOGFONTW *plf;
|
||||||
|
|
||||||
|
ASSERT(lf);
|
||||||
plfont = LFONT_AllocFontWithHandle();
|
plfont = LFONT_AllocFontWithHandle();
|
||||||
if (!plfont)
|
if (!plfont)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue