*A temp fix for the crash caused by players disconnected in bg. Replace assert(false) by return NULL;

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-23 10:00:52 -06:00
parent 7ca5b9a8e7
commit 6395b4856f
+7 -1
View File
@@ -148,7 +148,13 @@ Map* MapInstanced::GetInstance(const WorldObject* obj)
// instantiate or find existing bg map for player
// the instance id is set in battlegroundid
NewInstanceId = player->GetBattleGroundId();
assert(NewInstanceId);
if(!NewInstanceId)
{
if(player->GetSession()->PlayerLoading())
return NULL;
else
assert(NewInstanceId);
}
map = _FindMap(NewInstanceId);
if(!map)
map = CreateBattleGround(NewInstanceId);