diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-23 21:35:39 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-07-23 21:35:39 +0000 |
commit | 037b3cc24227735c0987f879f80bf57fb2d16d1d (patch) | |
tree | 9ad559f5ec0419dfeb84faad6835f07a6a4b18e8 /src | |
parent | 525986cc0141065b2606807071ce6af22043c80d (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/helperfuncs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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; |