From 95d8e798d30fff70c71d1b3256bbb7852efaee02 Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Tue, 16 Jul 2002 13:17:53 +0000 Subject: [PATCH] Removed a crash on zebraidx init, if the register area isn't there --- bfile/bfile.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); } -- 1.7.10.4