From 1a51f71afd794a52a24cbcb7547000e0c563b0f6 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Mon, 19 Dec 2022 22:40:11 +0000 Subject: [PATCH] [subset] don't segfault when --help-all is specified w/ instancing options. --- util/hb-subset.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util/hb-subset.cc b/util/hb-subset.cc index bd4dea2d3..2f90048bd 100644 --- a/util/hb-subset.cc +++ b/util/hb-subset.cc @@ -668,6 +668,10 @@ parse_instance (const char *name, GError **error) { subset_main_t *subset_main = (subset_main_t *) data; + if (!subset_main->face) { + // There is no face, which is needed to set up instancing. Skip parsing these options. + return true; + } char *s = strtok((char *) arg, "="); while (s)