check for NULL symbol "type" pointer

This commit is contained in:
Stefan Schippers 2020-10-15 19:20:55 +02:00
parent b88c4bab9e
commit 742f854964
1 changed files with 2 additions and 1 deletions

View File

@ -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") &&