From a212be67bc0a6a16887f8363c8ba2ff224e085ad Mon Sep 17 00:00:00 2001 From: h_vogt Date: Sun, 6 May 2012 15:50:55 +0200 Subject: [PATCH] Exit with error if file not found: fgets() cannot read from NULL --- src/frontend/rawfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/rawfile.c b/src/frontend/rawfile.c index ccb2f52c4..7c247f266 100644 --- a/src/frontend/rawfile.c +++ b/src/frontend/rawfile.c @@ -294,7 +294,7 @@ raw_read(char *name) { if ((fp = fopen(name, "rb")) == NULL) { perror(name); - + controlled_exit(EXIT_FAILURE); } /* Since we call cp_evloop() from here, we have to do this junk. */