diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-05-02 00:28:22 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-05-02 00:28:22 +0100 |
commit | 827a9f7c2d98a10d09ab87b16c92a22295f21cde (patch) | |
tree | e0e2613d9d2fa8b3168ce71975c8db206e8d2f79 | |
parent | e5375795e1ac519eb62b79807d5f5d4c5841990d (diff) |
MAINT-4009: Patching the memory leak occurring in the scenario where toast panels were being created, but the screen channel were deciding not to display the given toasts.
-rwxr-xr-x | indra/newview/llscreenchannel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 6a840f3f40..8708fb87ee 100755 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -273,6 +273,14 @@ void LLScreenChannel::addToast(const LLToast::Params& p) // only cancel notification if it isn't being used in IM session LLNotifications::instance().cancel(notification); } + + // It was assumed that the toast would take ownership of the panel pointer. + // But since we have decided not to display the toast, kill the panel to + // prevent the memory leak. + if (p.panel != NULL) + { + p.panel()->die(); + } return; } |