diff options
| author | megamage <none@none> | 2009-02-23 10:00:52 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-02-23 10:00:52 -0600 |
| commit | 6395b4856ff124bffee716252295683976878fe1 (patch) | |
| tree | a97915e2bd56621a81dab8f9df9aa27a131a8d96 /src/game/MapInstanced.cpp | |
| parent | 7ca5b9a8e7e5cf8dba02dc6a4a6d027b5892fb89 (diff) | |
*A temp fix for the crash caused by players disconnected in bg. Replace assert(false) by return NULL;
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapInstanced.cpp')
| -rw-r--r-- | src/game/MapInstanced.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/MapInstanced.cpp b/src/game/MapInstanced.cpp index 47c0fb56b0c..fe99c5c5e71 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); |
