diff options
Diffstat (limited to 'src/cmd/grap/print.c')
-rw-r--r-- | src/cmd/grap/print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/grap/print.c b/src/cmd/grap/print.c index dbecb5df..a7497e44 100644 --- a/src/cmd/grap/print.c +++ b/src/cmd/grap/print.c @@ -23,8 +23,9 @@ void print(void) /* arrange final output */ int c; double dx, dy, xfac, yfac; - if (tfd != NULL) { - fclose(tfd); /* end the temp file */ + if (tfd != stdout) { + if (tfd) + fclose(tfd); /* end the temp file */ tfd = stdout; } |