From 9ac03f0b59ea5a6274309c6915666f4a79c0cb09 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Mon, 12 May 2008 10:40:20 +0000 Subject: FIX #2234: don't generate .prof unless we're going to put something in it --- rts/RtsStartup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/RtsStartup.c') diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 4f42823d4a..0ce17fe16f 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -499,7 +499,7 @@ hs_exit_(rtsBool wait_foreign) // Originally, this was in report_ccs_profiling(). Now, retainer // profiling might tack some extra stuff on to the end of this file // during endProfiling(). - fclose(prof_file); + if (prof_file != NULL) fclose(prof_file); #endif #if defined(TICKY_TICKY) -- cgit v1.2.1