Dungeon Finder: Add a check to avoid rolechecks with no dungeon (Only happen with groups loaded from DB)

This fixes a crash in UpdateProposal.

Updates issue 3465

--HG--
branch : trunk
This commit is contained in:
Spp
2010-08-20 01:27:05 +02:00
parent cf3c9b4ed6
commit c75ab7fd28

View File

@@ -872,7 +872,7 @@ void LFGMgr::UpdateRoleCheck(Group *grp, Player *plr /* = NULL*/)
pRoleCheck->roles[plrg->GetGUIDLow()] = 0;
// Check if it's offer continue or trying to find a new instance after a random assigned (Join Random + LfgGroup)
if (grp->isLFGGroup() && dungeons->size() == 1 && isRandomDungeon(*dungeons->begin()))
if (grp->isLFGGroup() && dungeons->size() == 1 && isRandomDungeon(*dungeons->begin()) && grp->GetLfgDungeonEntry())
pRoleCheck->dungeons.insert(grp->GetLfgDungeonEntry());
else
for (LfgDungeonSet::const_iterator itDungeon = dungeons->begin(); itDungeon != dungeons->end(); ++itDungeon)