From 883957688cc4aa4335e5131a60b3ac3b53290726 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Aug 2018 21:42:18 -0700 Subject: [PATCH] Fix assertion failure https://bugzilla.mozilla.org/show_bug.cgi?id=1476334 --- src/hb-machinery-private.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hb-machinery-private.hh b/src/hb-machinery-private.hh index 119625c45..39a7fd1f6 100644 --- a/src/hb-machinery-private.hh +++ b/src/hb-machinery-private.hh @@ -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_; }