Fix an asterisk crash if no asterisk.conf configuration file is present.
authorEliel C. Sardanons <eliels@gmail.com>
Fri, 7 Nov 2008 02:37:47 +0000 (02:37 +0000)
committerEliel C. Sardanons <eliels@gmail.com>
Fri, 7 Nov 2008 02:37:47 +0000 (02:37 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155175 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/pbx.c

index 39d083f..7513450 100644 (file)
@@ -6548,6 +6548,7 @@ int ast_load_documentation(void)
 
        if (!(cfg = ast_config_load2("asterisk.conf", "" /* core can't reload */, cnfflags))) {
                ast_log(LOG_ERROR, "No asterisk.conf? That cannot be good.\n");
+               return 1;
        }
 
        for (var = ast_variable_browse(cfg, "options"); var; var = var->next) {