From 20ea748631386742af4c5ee169926129e8728393 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 25 Jun 2010 13:03:31 -0700 Subject: Fix EXT-8075: close signal connection on destruction to prevent callbacks after LLInspectToast is, well, toast. --- indra/newview/llinspecttoast.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinspecttoast.cpp') diff --git a/indra/newview/llinspecttoast.cpp b/indra/newview/llinspecttoast.cpp index 3ca8fa2f56..9a10a7ede8 100644 --- a/indra/newview/llinspecttoast.cpp +++ b/indra/newview/llinspecttoast.cpp @@ -55,7 +55,7 @@ public: private: void onToastDestroy(LLToast * toast); -private: + boost::signals2::scoped_connection mConnection; LLPanel* mPanel; LLScreenChannel* mScreenChannel; }; @@ -88,7 +88,7 @@ void LLInspectToast::onOpen(const LLSD& notification_id) llwarns << "Could not get requested toast from screen channel." << llendl; return; } - toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1)); + mConnection = toast->setOnToastDestroyedCallback(boost::bind(&LLInspectToast::onToastDestroy, this, _1)); LLPanel * panel = toast->getPanel(); panel->setVisible(TRUE); -- cgit v1.2.3