diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh index ce46f3fe8..5cff5b976 100644 --- a/src/hb-ot-color-sbix-table.hh +++ b/src/hb-ot-color-sbix-table.hh @@ -246,15 +246,16 @@ struct sbix if (likely (sbix_len == 0)) return false; - int x_offset, y_offset; + int x_offset = 0, y_offset = 0; hb_blob_t *blob = reference_blob_for_glyph (font, glyph, HB_TAG ('p','n','g',' '), &x_offset, &y_offset); - const PNGHeader &png = *blob->as(); if (unlikely (blob->length < sizeof (PNGHeader))) return false; + const PNGHeader &png = *blob->as(); + extents->x_bearing = x_offset; extents->y_bearing = y_offset; extents->width = png.IHDR.width;