summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-07-10 09:12:54 -0400
committerOz Linden <oz@lindenlab.com>2015-07-10 09:12:54 -0400
commit66bf21c32d64422f9fdc56161acc83b53923735b (patch)
treebdd1e565308fb97d7b8b2c97f9cd16489a1b285d /indra/newview/llscreenchannel.cpp
parentdc5960d3930efa482b7de205fc9b8d08785da4c8 (diff)
parent657944cda7228ba824239d94b270160ac0460934 (diff)
merge up to 3.8.0-release (and fix for unit tests with a proxy enabled)'
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;
}
//--------------------------------------------------------------------------