From f77ff40604dbbaeabc63d6fe2d6c59e12e00e205 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 27 Jan 2009 08:17:29 +0000 Subject: [PATCH] Lack of a backend name is no reasonable cause for a panic. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3544 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_vrt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_vrt.c b/varnish-cache/bin/varnishd/cache_vrt.c index e2fd9eef..f9db47ae 100644 --- a/varnish-cache/bin/varnishd/cache_vrt.c +++ b/varnish-cache/bin/varnishd/cache_vrt.c @@ -697,9 +697,10 @@ VRT_double_string(const struct sess *sp, double num) const char * VRT_backend_string(struct sess *sp) { - CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC); - return (sp->director->vcl_name); + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + if (sp->director == NULL) + return (NULL); + return (sp->director->vcl_name); } /*--------------------------------------------------------------------*/ -- 2.39.5