[WIN32SS][NTGDI][FREETYPE] Add ASSERT(pOS2); to FillTM (#2170)

I had used a static analyzer cppcheck to improve the code. This analyzer suggested NULL check for this code.
This commit is contained in:
Katayama Hirofumi MZ 2019-12-25 18:27:44 +09:00 committed by GitHub
parent 9ce12f0b4c
commit fb7ac93dd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2272,6 +2272,10 @@ FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI,
return;
}
ASSERT(pOS2);
if (!pOS2)
return;
if ((FT_Short)pOS2->usWinAscent + (FT_Short)pOS2->usWinDescent == 0)
{
Ascent = pHori->Ascender;