From: Martin Mares Date: Sun, 14 Jan 2001 20:49:49 +0000 (+0000) Subject: Allow bclose(NULL). X-Git-Tag: holmes-import~1591 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=753302b5281e6ed889cfd1ed755a7104cc421802;p=libucw.git Allow bclose(NULL). --- diff --git a/lib/fastbuf.c b/lib/fastbuf.c index 1a145784..1895e9bd 100644 --- a/lib/fastbuf.c +++ b/lib/fastbuf.c @@ -12,9 +12,12 @@ void bclose(struct fastbuf *f) { - bflush(f); - f->close(f); - xfree(f); + if (f) + { + bflush(f); + f->close(f); + xfree(f); + } } void bflush(struct fastbuf *f)