X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/8bb4c753e2d626ee90460e6d9f9cbaa2cd1f560d..affac6132ae6ee354e1497e456b5c81a0c84334f:/src/symtab.c diff --git a/src/symtab.c b/src/symtab.c index 634ddfa0..bf231628 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -85,10 +85,15 @@ symbol_new (uniqstr tag, location loc) void symbol_print (symbol *s, FILE *f) { - fprintf (f, "\"%s\"", s->tag); - SYMBOL_ATTR_PRINT (type_name); - SYMBOL_ATTR_PRINT (destructor); - SYMBOL_ATTR_PRINT (printer); + if (s) + { + fprintf (f, "\"%s\"", s->tag); + SYMBOL_ATTR_PRINT (type_name); + SYMBOL_ATTR_PRINT (destructor); + SYMBOL_ATTR_PRINT (printer); + } + else + fprintf (f, ""); } #undef SYMBOL_ATTR_PRINT