summaryrefslogtreecommitdiff
path: root/src/settingsgen
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2011-03-04 22:34:10 +0000
committerglx <glx@openttd.org>2011-03-04 22:34:10 +0000
commit7f54c59a66ddec3fa1bb6b730f580b6189adcdc8 (patch)
tree035812b6ca312cf338da41fafbf95aa5e14dccf7 /src/settingsgen
parent150b5c0bf75074b6e7aa508346839036ea234620 (diff)
downloadopenttd-7f54c59a66ddec3fa1bb6b730f580b6189adcdc8.tar.xz
(svn r22188) -Add: Generate the settings as part of the MSVC build process, and enable it in Makefile too
Diffstat (limited to 'src/settingsgen')
-rw-r--r--src/settingsgen/settingsgen.cpp4
1 files changed, 4 insertions, 0 deletions
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);