From 7f54c59a66ddec3fa1bb6b730f580b6189adcdc8 Mon Sep 17 00:00:00 2001 From: glx Date: Fri, 4 Mar 2011 22:34:10 +0000 Subject: (svn r22188) -Add: Generate the settings as part of the MSVC build process, and enable it in Makefile too --- src/settingsgen/settingsgen.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/settingsgen/settingsgen.cpp') diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp index f5a087f21..16300292a 100644 --- a/src/settingsgen/settingsgen.cpp +++ b/src/settingsgen/settingsgen.cpp @@ -448,6 +448,10 @@ int CDECL main(int argc, char *argv[]) CopyFile(after_file, stdout); } else { FILE *fp = fopen(output_file, "w"); + if (fp == NULL) { + fprintf(stderr, "settingsgen: Warning: Cannot open file %s\n", output_file); + return 1; + } CopyFile(before_file, fp); _stored_output.Write(fp); CopyFile(after_file, fp); -- cgit v1.2.3-70-g09d2