*Add some crash prevention checks.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-03 12:52:31 +02:00
parent 71adccb1c7
commit 8777efd03c
10 changed files with 176 additions and 172 deletions

View File

@@ -6483,16 +6483,14 @@ void ObjectMgr::LoadCorpses()
uint32 guid = fields[result->GetFieldCount()-1].GetUInt32();
uint32 mapId;
uint32 instanceId;
Corpse *corpse = new Corpse;
if(!corpse->LoadFromDB(guid,fields,mapId,instanceId))
if(!corpse->LoadFromDB(guid,fields))
{
delete corpse;
continue;
}
ObjectAccessor::Instance().AddCorpse(corpse,mapId,instanceId);
ObjectAccessor::Instance().AddCorpse(corpse);
++count;
}