From 6395b4856ff124bffee716252295683976878fe1 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 23 Feb 2009 10:00:52 -0600 Subject: [PATCH] *A temp fix for the crash caused by players disconnected in bg. Replace assert(false) by return NULL; --HG-- branch : trunk --- src/game/MapInstanced.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/MapInstanced.cpp b/src/game/MapInstanced.cpp index 47c0fb56b0..fe99c5c5e7 100644 --- a/src/game/MapInstanced.cpp +++ b/src/game/MapInstanced.cpp @@ -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);