From: Kern Sibbald Date: Sun, 2 Oct 2016 07:55:45 +0000 (+0200) Subject: Make another attempt to resolve bug #2176 X-Git-Tag: Release-7.4.5~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e8a8f9df7c3ec9366b9c22129006788fb7e6b2af;p=bacula%2Fbacula Make another attempt to resolve bug #2176 --- diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index 0dec091aba..5cad2b9d6b 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -2163,6 +2163,11 @@ extern "C" char *job_code_callback_director(JCR *jcr, const char* param) { static char yes[] = "yes"; static char no[] = "no"; + static char nothing[] = ""; + + if (jcr == NULL) { + return nothing; + } switch (param[0]) { case 'f': if (jcr->fileset) { @@ -2191,7 +2196,7 @@ extern "C" char *job_code_callback_director(JCR *jcr, const char* param) case 'C': return jcr->cloned ? yes : no; } - return NULL; + return nothing; } bool parse_dir_config(CONFIG *config, const char *configfile, int exit_code)