diff options
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1304,11 +1304,12 @@ static struct HXrbnode *HXrbtrav_rewalk(struct HXrbtrav *trav) trav->current = trav->path[--trav->depth]; if (trav->current == NULL) fprintf(stderr, "btrav_rewalk: problem: current==NULL\n"); - HXrbtrav_checkpoint(trav, trav->current); + else + HXrbtrav_checkpoint(trav, trav->current); } trav->tid = btree->tid; - if (go_next) + if (trav->current != nullptr && go_next) return HXrbtrav_next(trav); else return trav->current; |