[8586] Fixed crash when no event indexes loaded.

Minor coding style fixes.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-10-06 03:11:44 +02:00
parent b9168145b5
commit 9e669137a1

View file

@ -2137,8 +2137,14 @@ void BattleGroundMgr::LoadBattleEventIndexes()
{ {
barGoLink bar(1); barGoLink bar(1);
bar.step(); bar.step();
sLog.outString();
sLog.outErrorDb(">> Loaded 0 battleground eventindexes.");
return;
} }
barGoLink bar(result->GetRowCount()); barGoLink bar(result->GetRowCount());
do do
{ {
bar.step(); bar.step();
@ -2191,9 +2197,8 @@ void BattleGroundMgr::LoadBattleEventIndexes()
++count; ++count;
} while(result->NextRow()); } while(result->NextRow());
sLog.outString(); sLog.outString();
sLog.outString( ">> Loaded %u battleground eventindexes", count); sLog.outString( ">> Loaded %u battleground eventindexes", count);
if (count == 0)
return;
delete result; delete result;
} }