CHUI-934 FIXED Do not add to vector if session is closed to avoid crash.

meow-7.2.2
Mnikolenko ProductEngine 2013-04-25 14:52:28 +03:00
parent 5cf1c9bfe1
commit e4207901d7
1 changed files with 9 additions and 4 deletions

View File

@ -442,8 +442,11 @@ void LLFloaterIMSession::addSessionParticipants(const uuid_vec_t& uuids)
}
else
{
// remember whom we have invited, to notify others later, when the invited ones actually join
mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
if(findInstance(mSessionID))
{
// remember whom we have invited, to notify others later, when the invited ones actually join
mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
}
inviteToSession(uuids);
}
@ -472,13 +475,15 @@ void LLFloaterIMSession::addP2PSessionParticipants(const LLSD& notification, con
if(findInstance(mSessionID))
{
onClose(false);
// remember whom we have invited, to notify others later, when the invited ones actually join
mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
}
// we start a new session so reset the initialization flag
mSessionInitialized = false;
// remember whom we have invited, to notify others later, when the invited ones actually join
mInvitedParticipants.insert(mInvitedParticipants.end(), uuids.begin(), uuids.end());
// Start a new ad hoc voice call if we invite new participants to a P2P call,
// or start a text chat otherwise.