Fix assertion failure
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 9 Aug 2018 04:42:18 +0000 (21:42 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 9 Aug 2018 04:42:18 +0000 (21:42 -0700)
https://bugzilla.mozilla.org/show_bug.cgi?id=1476334

src/hb-machinery-private.hh

index 119625c..39a7fd1 100644 (file)
@@ -639,7 +639,8 @@ struct hb_lazy_loader_t
 
   inline void set_stored (Stored *instance_)
   {
-    assert (instance == nullptr);
+    if (instance)
+      thiz ()->destroy (instance);
     instance = instance_;
   }