From 3e5a103e55a7b8a0a4e0ac22b3fb53190339333e Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 22 Jan 2004 04:16:19 +0000 Subject: [PATCH] proper error checking when openning progs.src --- tools/qfcc/source/qfcc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qfcc/source/qfcc.c b/tools/qfcc/source/qfcc.c index 0a32aaf32..fd4e6b0ca 100644 --- a/tools/qfcc/source/qfcc.c +++ b/tools/qfcc/source/qfcc.c @@ -686,6 +686,11 @@ progs_src_compile (void) dsprintf (filename, "%s", progs_src); src = load_file (filename->str); + if (!src) { + fprintf (stderr, "couldn't open %s: %s\n", filename->str, + strerror (errno)); + return 1; + } if (!(src = COM_Parse (src))) { fprintf (stderr, "No destination filename. qfcc --help for info.\n");