fix crash in hb_map_t::clear()

in case called immediately after init()
pull/1597/head
Michiharu Ariza 6 years ago
parent a17ed8459e
commit eebc21c8de
  1. 3
      src/hb-map.hh

@ -170,7 +170,8 @@ struct hb_map_t
void clear () void clear ()
{ {
memset (items, 0xFF, ((size_t) mask + 1) * sizeof (item_t)); if (items)
memset (items, 0xFF, ((size_t) mask + 1) * sizeof (item_t));
population = occupancy = 0; population = occupancy = 0;
} }

Loading…
Cancel
Save