]> err.no Git - varnish/commitdiff
Lack of a backend name is no reasonable cause for a panic.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 27 Jan 2009 08:17:29 +0000 (08:17 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 27 Jan 2009 08:17:29 +0000 (08:17 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3544 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt.c

index e2fd9eef44980b0de1920aeb2aa92e5e12f937ce..f9db47ae8cf9968a93e40d7a6f4ea36e41ebec7b 100644 (file)
@@ -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);
 }
 
 /*--------------------------------------------------------------------*/