summaryrefslogtreecommitdiffstats
path: root/src/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.c')
-rw-r--r--src/color.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/color.c b/src/color.c
index 98fe9f2..94fcac8 100644
--- a/src/color.c
+++ b/src/color.c
@@ -877,6 +877,10 @@ static int cbuff(CFILE *cfile, const char *format, ...);
/** Dump a parsed expression tree, for debugging. */
static int print_expr(CFILE *cfile, const struct bfs_expr *expr, bool verbose) {
+ if (!expr) {
+ return dstrcat(&cfile->buffer, "(null)");
+ }
+
if (dstrcat(&cfile->buffer, "(") != 0) {
return -1;
}