Fix potential crash on uninitialised var

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11267 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
peavey 2009-03-27 18:20:49 +00:00
parent 01fac25f16
commit 40747ee2ad

View File

@ -773,6 +773,7 @@ void DispatcherThread::Run()
LoadDatabases(Parent->Conf, Parent->PublicServerInstance, Parent);
}
conn = NULL;
Parent->ConnMutex.Lock();
for (ConnMap::iterator i = Connections.begin(); i != Connections.end(); i++)
{
@ -806,9 +807,10 @@ void DispatcherThread::Run()
void DispatcherThread::OnNotify()
{
SQLConnection* conn;
while (1)
{
SQLConnection* conn = NULL;
conn = NULL;
Parent->ConnMutex.Lock();
for (ConnMap::iterator iter = Connections.begin(); iter != Connections.end(); iter++)
{