提交 eebc21c8 编写于 作者: M Michiharu Ariza

fix crash in hb_map_t::clear()

in case called immediately after init()
上级 a17ed845
...@@ -170,7 +170,8 @@ struct hb_map_t ...@@ -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;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册