summaryrefslogtreecommitdiffstats
path: root/zix/btree.c
diff options
context:
space:
mode:
Diffstat (limited to 'zix/btree.c')
-rw-r--r--zix/btree.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zix/btree.c b/zix/btree.c
index dc8f32b..55d6613 100644
--- a/zix/btree.c
+++ b/zix/btree.c
@@ -593,8 +593,10 @@ zix_btree_remove(ZixBTree* const t,
n->children[1]->n_vals};
n = zix_btree_merge(t, n, 0);
- ti->stack[ti->level].node = n;
- ti->stack[ti->level].index = counts[i];
+ if (ti) {
+ ti->stack[ti->level].node = n;
+ ti->stack[ti->level].index = counts[i];
+ }
} else {
// Both child's siblings are minimal, merge them
if (i < n->n_vals) {