From 7304e278ced9adee5884482bbf3223f8ba1ccfde Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 13 Jan 2020 00:04:55 +0100 Subject: lookup_style: Check that path isn't NULL --- libstorycode/stylesheet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libstorycode/stylesheet.c b/libstorycode/stylesheet.c index 8fa904e..66e444c 100644 --- a/libstorycode/stylesheet.c +++ b/libstorycode/stylesheet.c @@ -168,6 +168,7 @@ static struct style *lookup_style(struct style *sty, const char *path) const char *nxt = path; assert(sty != NULL); + if ( path == NULL ) return NULL; if ( path[0] == '\0' ) return sty; for ( i=0; in_substyles; i++ ) { -- cgit v1.2.3