diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-11 16:55:34 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-08-11 16:55:34 -0400 |
| commit | 47093f6e52741f36fcc782cb52e54baf9f6e3acf (patch) | |
| tree | 86b5d6fe9cd8dfbd5a9e36dab09c71f9de099cb3 /indra/newview/llscreenchannel.cpp | |
| parent | d822d0e96bb69374f49fef8a827a042474deda8d (diff) | |
| parent | 310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (diff) | |
merge
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; } //-------------------------------------------------------------------------- |
