diff options
author | Rider Linden <rider@lindenlab.com> | 2015-07-01 08:47:50 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-07-01 08:47:50 -0700 |
commit | 9f2302bdffde0c82a0cfab730a250aaee9b7059c (patch) | |
tree | 942b1e99701fa70993515d706bdedc836157ef30 /indra/newview/llscreenchannel.cpp | |
parent | f25179f148415763e310b0dd7f91a37dcf4c58c0 (diff) | |
parent | 4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff) |
Merge
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rwxr-xr-x | indra/newview/llscreenchannel.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 8708fb87ee..6d94b178dd 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -541,19 +541,23 @@ void LLScreenChannel::modifyToastByNotificationID(LLUUID id, LLPanel* panel) { std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), id); + LLPanel* panel_to_delete = panel; + if( it != mToastList.end() && panel) { LLToast* toast = it->getToast(); if (toast) { - LLPanel* old_panel = toast->getPanel(); - toast->removeChild(old_panel); - delete old_panel; - toast->insertPanel(panel); - toast->startTimer(); + LLPanel* old_panel = toast->getPanel(); + toast->removeChild(old_panel); + panel_to_delete = old_panel; + toast->insertPanel(panel); + toast->startTimer(); } redrawToasts(); } + + delete panel_to_delete; } //-------------------------------------------------------------------------- |