From 037b3cc24227735c0987f879f80bf57fb2d16d1d Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 23 Jul 2007 21:35:39 +0000 Subject: Sanity check: we don't want to deal with Config being invalid while logging git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7522 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 3591a2d89..26f470b5f 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -30,6 +30,10 @@ static time_t LAST = 0; */ void InspIRCd::Log(int level, const char* text, ...) { + /* sanity check, just in case */ + if (!this->Config) + return; + /* Do this check again here so that we save pointless vsnprintf calls */ if ((level < Config->LogLevel) && !Config->forcedebug) return; @@ -46,6 +50,7 @@ void InspIRCd::Log(int level, const char* text, ...) void InspIRCd::Log(int level, const std::string &text) { + /* sanity check, just in case */ if (!this->Config) return; -- cgit v1.2.3