summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-02-24 21:02:12 -0500
committerNat Goodspeed <nat@lindenlab.com>2015-02-24 21:02:12 -0500
commitb5324afb6f2e45deefb9b79e7e2192bc686b181a (patch)
treedcae0395e2975f736a90c1fa3c67d6f318e01cc7 /indra/newview/llscreenchannel.cpp
parent9b45bc992edf8d049d8a1abe2e778870a493295a (diff)
parentc7841b48bdec74848a64e2dd0eac453ce855093d (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
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;
}
//--------------------------------------------------------------------------