]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix: request may be NULL on some errors.
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 18 Oct 2008 06:25:40 +0000 (19:25 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 18 Oct 2008 06:25:40 +0000 (19:25 +1300)
src/errorpage.cc

index 50f40191d9277e5a3726cded2b037b7f5ff09a95..c075a75deca4e2eb543eb7565f998b0c4660e931 100644 (file)
@@ -908,7 +908,7 @@ ErrorState::BuildContent()
     /** error_directory option in squid.conf overrides translations.
      * Otherwise locate the Accept-Language header
      */
-    if(!Config.errorDirectory && request->header.getList(HDR_ACCEPT_LANGUAGE, &hdr) ) {
+    if(!Config.errorDirectory && request && request->header.getList(HDR_ACCEPT_LANGUAGE, &hdr) ) {
 
         const char *buf = hdr.buf(); // raw header string for parsing
         int pos = 0; // current parsing position in header string