diff options
author | Adam <Adam@anope.org> | 2016-11-05 10:34:25 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-11-05 10:34:25 -0400 |
commit | 7453c71c005671f729e26f2bbeeb750d32c88718 (patch) | |
tree | ccd79597712bbb34e07e0ad67d2e6d09c0e080f0 /modules/extra/stats/irc2sql/irc2sql.cpp | |
parent | f09ea316dda61a162253b373689c05dfbfd29d6e (diff) |
irc2sql: fix crash on shutdown with no sql
Diffstat (limited to 'modules/extra/stats/irc2sql/irc2sql.cpp')
-rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index 99fb46da3..7baa191f5 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; } |