summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rwxr-xr-xindra/newview/llscreenchannel.cpp8
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;
}