From 742f8549642de9c8c3c6e647774019e703ef0335 Mon Sep 17 00:00:00 2001 From: Stefan Schippers Date: Thu, 15 Oct 2020 19:20:55 +0200 Subject: [PATCH] check for NULL symbol "type" pointer --- src/netlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/netlist.c b/src/netlist.c index bb46e108..ca18279d 100644 --- a/src/netlist.c +++ b/src/netlist.c @@ -677,7 +677,8 @@ void prepare_netlist_structs(int for_netlist) !get_tok_value((xctx->inst[i].ptr+ xctx->sym)->templ, "name", 0)[0] ) { char str[2048]; - if( strcmp(type, "package") && + if( type && + strcmp(type, "package") && strcmp(type, "port_attributes") && strcmp(type, "architecture") && strcmp(type, "arch_declarations") &&