From e2bca66dc4a289bdc3674ee85ce972872acd4a3a Mon Sep 17 00:00:00 2001 From: venko Date: Fri, 7 May 2021 14:36:37 -0700 Subject: [PATCH] Adds null-guard to PrintIdTree --- src/identcheck.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/identcheck.c b/src/identcheck.c index 32408d8..75e966c 100644 --- a/src/identcheck.c +++ b/src/identcheck.c @@ -127,6 +127,11 @@ void PrintIdNode(IdNode *node) { } void PrintIdTree(IdNode *tree, uint32_t tabCount) { + if (tree == NULL) { + fprintf(stderr, "wraith: Attempted to call PrintIdTree on a null value.\n"); + return; + } + uint32_t i; for (i = 0; i < tabCount; i++) { printf("| ");