Fix monochrome crash

This commit is contained in:
Anurag Thakur 2022-10-19 02:18:04 +05:30
parent 108e5e3e34
commit 08e08f5908
1 changed files with 9 additions and 0 deletions

View File

@ -75,6 +75,15 @@ take a variable named `memory`. It can only be known if you follow the macros 3
goto Exit;
}
/* check mode */
if ( mode != FT_RENDER_MODE_NORMAL &&
mode != FT_RENDER_MODE_LIGHT &&
mode != FT_RENDER_MODE_LCD &&
mode != FT_RENDER_MODE_LCD_V )
{
error = FT_THROW( Cannot_Render_Glyph );
goto Exit;
}
/* deallocate the previously allocated bitmap */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )