From 88d64136a6c7af894386adce552694a6030e70ba Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Mon, 22 Nov 2021 21:47:13 +0100 Subject: [PATCH] fix remove_symbols() not first deleting instance .node[] fields on instances --- src/actions.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/actions.c b/src/actions.c index 23e8fb86..354e2fc3 100644 --- a/src/actions.c +++ b/src/actions.c @@ -525,13 +525,14 @@ void remove_symbols(void) { int j; + for(j = 0; j < xctx->instances; j++) { /* must be deleted before symbols are deleted */ + delete_inst_node(j); + xctx->inst[j].ptr = -1; /* clear symbol reference on instanecs */ + } for(j=xctx->symbols-1;j>=0;j--) { dbg(2, "remove_symbols(): removing symbol %d\n",j); remove_symbol(j); } - for(j = 0; j < xctx->instances; j++) { - xctx->inst[j].ptr = -1; /* clear symbol reference on instanecs */ - } dbg(1, "remove_symbols(): done\n"); }