CHUI-131 FIX Crash when selecting Show on inventory offer notification if other notifications are being received

meow-7.2.2
Richard Linden 2012-05-25 12:04:12 -07:00
parent d713925f43
commit 8a2b6f7d2e
1 changed files with 4 additions and 3 deletions

View File

@ -499,15 +499,16 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id)
void LLScreenChannel::removeToastByNotificationID(LLUUID id)
{
std::vector<ToastElem>::iterator it = mToastList.begin();
std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id);
while( it != mToastList.end())
{
// find next toast with matching id
it = find(it, mToastList.end(), id);
deleteToast(it->getToast());
mToastList.erase(it);
redrawToasts();
// find next toast with matching id
it = find(mToastList.begin(), mToastList.end(), id);
}
it = find(mStoredToastList.begin(), mStoredToastList.end(), id);
if (it != mStoredToastList.end())
{