1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 02:06:37 +02:00

irc2sql: fix crash on shutdown with no sql

This commit is contained in:
Adam
2016-11-05 10:34:25 -04:00
parent f09ea316dd
commit 7453c71c00
+2 -1
View File
@@ -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;
}