diff --git a/src/common/ConfigManager.cpp b/src/common/ConfigManager.cpp index 2cccd5cd..83d87a1d 100644 --- a/src/common/ConfigManager.cpp +++ b/src/common/ConfigManager.cpp @@ -758,6 +758,10 @@ void SaveConfigFile() if (configFile != NULL) { FILE *f = fopen(configFile, "w"); + if (f == NULL) { + log("Configuration file could not be opened %s\n", optarg); + return; + } // Needs mixed case version of the option name to add new options into the ini //for (int i = 0; i < (sizeof(argOptions) / sizeof(option)); i++) //{