From 0ae3294ae95165b4e489b19e9dd9d2e7a3e477a8 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Tue, 16 Sep 2008 03:48:19 +1200 Subject: [PATCH] Compile errors --- src/errorpage.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/errorpage.cc b/src/errorpage.cc index 9e7e1181c9..0cd6b22a98 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -123,7 +123,7 @@ static char **error_text = NULL; static int error_page_count = 0; /// \ingroup ErrorPageInternal -static MemBuf error_page_stylesheet_content; +static MemBuf error_stylesheet; static char *errorTryLoadText(const char *page_name, const char *dir, bool silent = false); static char *errorLoadText(const char *page_name); @@ -186,9 +186,15 @@ errorInitialize(void) } } + error_stylesheet.reset(); + // look for and load stylesheet into global MemBuf for it. if(Config.errorStylesheet) { - error_page_stylesheet_content = errorLoadText(Config.errorStylesheet); + char *temp = errorLoadText(Config.errorStylesheet); + if(temp) { + error_stylesheet.Printf("%s",temp); + safe_free(temp); + } } } @@ -683,7 +689,7 @@ ErrorState::Convert(char token) break; case 'l': - mb.append(error_page_stylesheet_content.content(), error_page_stylesheet_content.contentSize()); + mb.append(error_stylesheet.content(), error_stylesheet.contentSize()); do_quote = 0; break; -- 2.47.3