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("| ");