GRAPHICS: Remove superfluous memset

Surface::create already initialized memory to 0 and getPixels can be
nullptr if bitmap size is 0. In this case memset gets called with
nullptr which is undefined behaviour.
This commit is contained in:
Le Philousophe 2022-01-03 12:16:55 +01:00 committed by Filippos Karapetis
parent 8adffc0593
commit a110714141

View File

@ -817,7 +817,6 @@ bool TTFFont::cacheGlyph(Glyph &glyph, uint32 chr) const {
}
uint8 *dst = (uint8 *)glyph.image.getPixels();
memset(dst, 0, glyph.image.h * glyph.image.pitch);
switch (bitmap->pixel_mode) {
case FT_PIXEL_MODE_MONO: