summaryrefslogtreecommitdiff
path: root/src/helperfuncs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r--src/helperfuncs.cpp5
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;