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);
}
}
+ 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);
+ }
}
}
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;