From: Heikki Levanto Date: Tue, 16 Jul 2002 13:17:53 +0000 (+0000) Subject: Removed a crash on zebraidx init, if the register area isn't there X-Git-Tag: ZEBRA.1.3.0~22 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=95d8e798d30fff70c71d1b3256bbb7852efaee02;p=idzebra-moved-to-github.git Removed a crash on zebraidx init, if the register area isn't there --- diff --git a/bfile/bfile.c b/bfile/bfile.c index 2d92341..b0b8bea 100644 --- a/bfile/bfile.c +++ b/bfile/bfile.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: bfile.c,v $ - * Revision 1.33 2002-04-04 14:14:13 adam + * Revision 1.34 2002-07-16 13:17:53 heikki + * Removed a crash on zebraidx init, if the register area isn't there + * + * Revision 1.33 2002/04/04 14:14:13 adam * Multiple registers (alpha early) * * Revision 1.32 2000/03/15 15:00:30 adam @@ -145,6 +148,8 @@ BFiles bfs_create (const char *spec, const char *base) void bfs_destroy (BFiles bfs) { + if (!bfs) + return; xfree (bfs->cache_fname); xfree (bfs->base); mf_destroy (bfs->commit_area); @@ -278,6 +283,8 @@ int bf_commitExists (BFiles bfs) void bf_reset (BFiles bfs) { + if (!bfs) + return; mf_reset (bfs->commit_area); mf_reset (bfs->register_area); }