Imported Upstream version 2.4.0
[platform/upstream/harfbuzz.git] / src / hb-map.hh
index 02d5406..f7156e5 100644 (file)
@@ -170,7 +170,7 @@ struct hb_map_t
 
   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;
   }