diff options
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
| -rw-r--r-- | indra/newview/llscreenchannel.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 839ca0f9c5..157821d554 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -499,21 +499,20 @@ void LLScreenChannel::killToastByNotificationID(LLUUID id) void LLScreenChannel::removeToastByNotificationID(LLUUID id) { - std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id); - if( it != mToastList.end()) + std::vector<ToastElem>::iterator it = mToastList.begin(); + while( it != mToastList.end()) { + // find next toast with matching id + it = find(it, mToastList.end(), id); deleteToast(it->getToast()); mToastList.erase(it); redrawToasts(); } - else + it = find(mStoredToastList.begin(), mStoredToastList.end(), id); + if (it != mStoredToastList.end()) { - it = find(mStoredToastList.begin(), mStoredToastList.end(), id); - if (it != mStoredToastList.end()) - { - deleteToast(it->getToast()); - mStoredToastList.erase(it); - } + deleteToast(it->getToast()); + mStoredToastList.erase(it); } } |
