From 1002980a7021fb764fc86ac92ecb6928f67a573b Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Fri, 5 Feb 2010 16:36:19 +0200 Subject: Fixed critical bug EXT - 4906 (Viewer crashes after group message was sent if close IM chat from message sender previously) --HG-- branch : product-engine --- indra/newview/llimfloatercontainer.cpp | 7 +++++++ indra/newview/llimfloatercontainer.h | 1 + 2 files changed, 8 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 9539553121..ba034609e9 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -100,6 +100,7 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, icon = LLUICtrlFactory::instance().createWidget(icon_params); mSessions[session_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, session_id)); } else { @@ -110,10 +111,16 @@ void LLIMFloaterContainer::addFloater(LLFloater* floaterp, icon = LLUICtrlFactory::instance().createWidget(icon_params); mSessions[avatar_id] = floaterp; + floaterp->mCloseSignal.connect(boost::bind(&LLIMFloaterContainer::onCloseFloater, this, avatar_id)); } mTabContainer->setTabImage(floaterp, icon); } +void LLIMFloaterContainer::onCloseFloater(LLUUID& id) +{ + mSessions.erase(id); +} + void LLIMFloaterContainer::processProperties(void* data, enum EAvatarProcessorType type) { if (APT_PROPERTIES == type) diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index daf367da11..b07ef2d71d 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -51,6 +51,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + void onCloseFloater(LLUUID& id); /*virtual*/ void addFloater(LLFloater* floaterp, BOOL select_added_floater, -- cgit v1.2.3