From 9413c52951387d357e5b81766d67a92035b517fe Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Mon, 2 Oct 2000 13:06:20 -0500 Subject: [svn-r2627] Purpose: Bug fix Description: Attempted to close rawdatastream even if it has not been used to open a new file. Many systems tolerated the NULL value but not FreeBSD. Solution: Check for the NULL value too. Platforms tested: hawkwind (freeBSD) and modi4 parallel. --- tools/h5dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/h5dump.c b/tools/h5dump.c index 886737b..6b21244 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -1743,7 +1743,7 @@ done: if (H5Fclose(fid) < 0) d_status = 1; - if (rawdatastream != stdout) + if (rawdatastream && rawdatastream != stdout) if (fclose(rawdatastream)) perror("fclose"); -- cgit v0.12