aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2020-01-13 00:04:55 +0100
committerThomas White <taw@bitwiz.me.uk>2020-01-13 00:04:55 +0100
commit7304e278ced9adee5884482bbf3223f8ba1ccfde (patch)
tree73ec0dd900c61c5737b1fa1bb6b9099c78bdacc8
parent956d397b8d34ba79fc7486f609a22ba80216384f (diff)
lookup_style: Check that path isn't NULL
-rw-r--r--libstorycode/stylesheet.c1
1 files changed, 1 insertions, 0 deletions
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; i<sty->n_substyles; i++ ) {