Fix MySQL crash on module unload with empty query queue

This commit is contained in:
danieldg 2010-03-22 21:54:49 +00:00 committed by Daniel De Graaf
parent e982cb765e
commit 13d719fe4c

View File

@ -445,8 +445,10 @@ void ModuleSQL::OnUnloadModule(Module* mod)
{
SQLerror err(SQL_BAD_DBID);
Dispatcher->LockQueue();
for(unsigned int i = qq.size() - 1; i >= 0; i--)
unsigned int i = qq.size();
while (i > 0)
{
i--;
if (qq[i].q->creator == mod)
{
if (i == 0)