diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-07-01 14:40:05 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-07-01 14:40:05 +0300 |
commit | 79ffc6569b8b0f4656c61f86b18e3bde22eb6dd5 (patch) | |
tree | aa47a0b1f3f086ae884990107014ede35745fdd8 /indra/newview/llscreenchannel.cpp | |
parent | 51aaed86dee3b45fa96fc7b4e8c1b9486c880b3b (diff) | |
parent | 4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff) |
Merge from viewer-relese and become version 3.8.1
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; } //-------------------------------------------------------------------------- |