summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-08-11 16:55:34 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-08-11 16:55:34 -0400
commit47093f6e52741f36fcc782cb52e54baf9f6e3acf (patch)
tree86b5d6fe9cd8dfbd5a9e36dab09c71f9de099cb3 /indra/newview/llscreenchannel.cpp
parentd822d0e96bb69374f49fef8a827a042474deda8d (diff)
parent310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (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;
}
//--------------------------------------------------------------------------