summaryrefslogtreecommitdiff
path: root/modules/extra/stats/irc2sql/irc2sql.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-04-07 14:29:31 -0400
committerAdam <Adam@anope.org>2017-04-07 14:29:31 -0400
commitaf48ee6c87ab10a7ffe25d93e2bca688a0c656b0 (patch)
tree86597fc5ac292c77f9c0c9174189b5105d104a94 /modules/extra/stats/irc2sql/irc2sql.cpp
parent733e20147ae7342da3ae78c38789d53f7d4a12c7 (diff)
parent7453c71c005671f729e26f2bbeeb750d32c88718 (diff)
Merge commit '7453c71c005671f729e26f2bbeeb750d32c88718'
Diffstat (limited to 'modules/extra/stats/irc2sql/irc2sql.cpp')
-rw-r--r--modules/extra/stats/irc2sql/irc2sql.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp
index 3ad901f74..3596a4f4b 100644
--- a/modules/extra/stats/irc2sql/irc2sql.cpp
+++ b/modules/extra/stats/irc2sql/irc2sql.cpp
@@ -4,7 +4,8 @@ void IRC2SQL::OnShutdown()
{
// TODO: test if we really have to use blocking query here
// (sometimes m_mysql get unloaded before the other thread executed all queries)
- SQL::Result r = this->sql->RunQuery(SQL::Query("CALL " + prefix + "OnShutdown()"));
+ if (this->sql)
+ SQL::Result r = this->sql->RunQuery(SQL::Query("CALL " + prefix + "OnShutdown()"));
quitting = true;
}