aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTartalo <none@none>2010-06-26 21:15:48 +0200
committerTartalo <none@none>2010-06-26 21:15:48 +0200
commit73a2a21ee4ce9cd2eefc885288d84ab3ca68a0fc (patch)
tree9b6388f71745a6427d404190ddb1fd60beda2014
parent037857c2ce19da58407addf96d2808af8d0bd541 (diff)
Fix possible crash
--HG-- branch : trunk
-rw-r--r--src/server/game/Entities/Player/Player.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 5093ec518a6..4100df480fe 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -16100,17 +16100,20 @@ bool Player::LoadFromDB(uint32 guid, SqlQueryHolder *holder)
// Map could be changed before
mapEntry = sMapStore.LookupEntry(mapId);
// client without expansion support
- if (mapEntry && GetSession()->Expansion() < mapEntry->Expansion())
+ if (mapEntry)
{
- sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
- RelocateToHomebind();
- }
+ if (GetSession()->Expansion() < mapEntry->Expansion())
+ {
+ sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), mapId);
+ RelocateToHomebind();
+ }
- // fix crash (because of if (Map *map = _FindMap(instanceId)) in MapInstanced::CreateInstance)
- if (instanceId)
- if (InstanceSave * save = GetInstanceSave(mapId, mapEntry->IsRaid()))
- if (save->GetInstanceId() != instanceId)
- instanceId = 0;
+ // fix crash (because of if (Map *map = _FindMap(instanceId)) in MapInstanced::CreateInstance)
+ if (instanceId)
+ if (InstanceSave * save = GetInstanceSave(mapId, mapEntry->IsRaid()))
+ if (save->GetInstanceId() != instanceId)
+ instanceId = 0;
+ }
// NOW player must have valid map
// load the player's map here if it's not already loaded