summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inp.c b/src/inp.c
index 9cc140f..6387587 100644
--- a/src/inp.c
+++ b/src/inp.c
@@ -61,7 +61,8 @@ re_input (void)
}
}
else {
- close (tifd);
+ if (tifd >= 0)
+ close (tifd);
tifd = -1;
if (tibuf[0])
{