Core/Dungeon Finder: Fix a crash in Join

Closes issue 4939

--HG--
branch : trunk
This commit is contained in:
Spp
2010-11-26 17:16:21 +01:00
parent 4ace88e909
commit c628685d59

View File

@@ -525,9 +525,12 @@ void LFGMgr::Join(Player* plr, uint8 roles, LfgDungeonSet* dungeons, std::string
if (sameDungeons) // Joining the same dungeons -- Send OK
{
plr->GetSession()->SendLfgJoinResult(LFG_JOIN_OK);
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
if (itr->getSource() && itr->getSource()->GetSession())
itr->getSource()->GetSession()->SendLfgUpdateParty(LFG_UPDATETYPE_ADDED_TO_QUEUE, dungeons, comment);
if (grp)
{
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
if (itr->getSource() && itr->getSource()->GetSession())
itr->getSource()->GetSession()->SendLfgUpdateParty(LFG_UPDATETYPE_ADDED_TO_QUEUE, dungeons, comment);
}
dungeons->clear();
delete dungeons;
return;