aboutsummaryrefslogtreecommitdiffstats
path: root/cint_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'cint_array.c')
-rw-r--r--cint_array.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/cint_array.c b/cint_array.c
index 3d812cbb..400e91d2 100644
--- a/cint_array.c
+++ b/cint_array.c
@@ -316,10 +316,14 @@ cint_remove(NODE *symbol, NODE *subs)
int h1;
NODE *tn, *xn = symbol->xarray;
- assert(symbol->nodes != NULL);
+ if (symbol->table_size == 0)
+ return NULL;
+
if (! ISUINT(symbol, subs))
goto xremove;
+ assert(symbol->nodes != NULL);
+
k = subs->numbr;
h1 = cint_hash(k);
tn = symbol->nodes[h1];
@@ -338,6 +342,7 @@ cint_remove(NODE *symbol, NODE *subs)
init_array(symbol); /* re-initialize array 'symbol' */
} else if(xn != NULL && symbol->table_size == xn->table_size) {
/* promote xn to symbol */
+
xn->flags &= ~XARRAY;
xn->parent_array = symbol->parent_array;
efree(symbol->nodes);