Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying...
[asterisk/asterisk.git] / cdr / cdr_csv.c
index 10fa0c1..eb0619b 100644 (file)
@@ -100,7 +100,7 @@ static int load_config(int reload)
        loguniqueid = 0;
        loguserfield = 0;
 
-       if (!(cfg = ast_config_load(config, config_flags))) {
+       if (!(cfg = ast_config_load(config, config_flags)) || cfg == CONFIG_STATUS_FILEINVALID) {
                ast_log(LOG_WARNING, "unable to load config: %s\n", config);
                return 0;
        } else if (cfg == CONFIG_STATUS_FILEUNCHANGED)