gsk: Fix uninitialized memory

This was causing crashes in some circumstances.
This commit is contained in:
Matthias Clasen 2019-10-15 20:54:24 -04:00
parent 0895f0211e
commit 173bb2e1e8

View File

@ -3547,6 +3547,7 @@ gsk_text_node_new (PangoFont *font,
self->has_color_glyphs = font_has_color_glyphs (font); self->has_color_glyphs = font_has_color_glyphs (font);
self->color = *color; self->color = *color;
self->offset = *offset; self->offset = *offset;
self->render_data = NULL;
self->num_glyphs = glyphs->num_glyphs; self->num_glyphs = glyphs->num_glyphs;
memcpy (self->glyphs, glyphs->glyphs, sizeof (PangoGlyphInfo) * glyphs->num_glyphs); memcpy (self->glyphs, glyphs->glyphs, sizeof (PangoGlyphInfo) * glyphs->num_glyphs);