From cb47dca74cbf6d147aac9cf3067f249555aa68b1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 29 Jan 2023 10:03:52 -0700 Subject: [PATCH] [object] Handle mallocation error in set_user_data Should make bots happy. --- src/hb-object.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-object.hh b/src/hb-object.hh index fe44a0b27..e2c2c3394 100644 --- a/src/hb-object.hh +++ b/src/hb-object.hh @@ -69,7 +69,7 @@ struct hb_lockable_set_t item = items.push (v); l.unlock (); } - return item; + return items.in_error () ? nullptr : item; } template