summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-06-30 16:46:45 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-06-30 16:46:45 -0400
commit491f30e43e571fca9939930a5e8d10caa5f65ad2 (patch)
treecd5ccb95b4b32374545a0bda36a49bebd9e5b2a0 /indra/newview/llscreenchannel.cpp
parent6c6b509aa3d4ca1e4620a80f0b6235393af2a33a (diff)
parent4aa64b99dbe6cafdccf0c25501feaef5ba3445c4 (diff)
merge
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rwxr-xr-xindra/newview/llscreenchannel.cpp14
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;
}
//--------------------------------------------------------------------------