From 4914ca575bd0a14918947baf131df739339fce38 Mon Sep 17 00:00:00 2001 From: Spp Date: Thu, 9 Dec 2010 14:25:48 +0100 Subject: [PATCH] Core/Dungeon Finder: Fix a crash in Join After a random dungeon is expanded to the corresponding dungeons and checked compatible dungeons of players joining. We have no dungeons and no lockmap. This may only happen when a random dungeon is expanded to no dungeon. And this may be impossible to happen Closes issue 5066 --HG-- branch : trunk --- src/server/game/DungeonFinding/LFGMgr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index 8ec2863f14..2f7435d6a8 100755 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -539,10 +539,6 @@ void LFGMgr::Join(Player* plr, uint8 roles, LfgDungeonSet& dungeons, std::string { sLog.outDebug("LFGMgr::Join: [" UI64FMTD "] joining with %u members. result: LFG_JOIN_PARTY_NOT_MEET_REQS", guid, uint8(players.size())); plr->GetSession()->SendLfgJoinResult(LFG_JOIN_PARTY_NOT_MEET_REQS, 0, lockStatusMap); - for (LfgLockStatusMap::const_iterator it = lockStatusMap->begin(); it != lockStatusMap->end(); ++it) - delete it->second; - delete lockStatusMap; - return; } if (lockStatusMap) { @@ -550,6 +546,8 @@ void LFGMgr::Join(Player* plr, uint8 roles, LfgDungeonSet& dungeons, std::string delete it->second; delete lockStatusMap; } + if (!dungeons.size()) + return; } // Can't join. Send result