X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/agedu/blobdiff_plain/b5af45d3e37e570183ff09f40c4e8ef09241ade2..38d8173dface29a968898430fbc9db618204bf50:/index.c diff --git a/index.c b/index.c index db3d2b3..c42da39 100644 --- a/index.c +++ b/index.c @@ -269,7 +269,9 @@ void indexbuild_rebase(indexbuild *ib, void *t) ib->t = t; ib->nodes = (struct avlnode *)((unsigned char *)ib->nodes + diff); ib->roots = (off_t *)((unsigned char *)ib->roots + diff); - ib->currroot = (struct avlnode *)((unsigned char *)ib->currroot + diff); + if (ib->currroot) + ib->currroot = (struct avlnode *) + ((unsigned char *)ib->currroot + diff); ib->firstmutable = (struct avlnode *)((unsigned char *)ib->firstmutable + diff); }