Skip to content
Snippets Groups Projects
Commit d0695ee1 authored by Richard Linden's avatar Richard Linden
Browse files

EXP-1465 FIX Crash in IM panel destructor

parent 35b8f7b1
No related branches found
No related tags found
No related merge requests found
...@@ -47,12 +47,13 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed) ...@@ -47,12 +47,13 @@ LLIMFloaterContainer::LLIMFloaterContainer(const LLSD& seed)
LLIMFloaterContainer::~LLIMFloaterContainer() LLIMFloaterContainer::~LLIMFloaterContainer()
{ {
mNewMessageConnection.disconnect();
LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this); LLTransientFloaterMgr::getInstance()->removeControlView(LLTransientFloaterMgr::IM, this);
} }
BOOL LLIMFloaterContainer::postBuild() BOOL LLIMFloaterContainer::postBuild()
{ {
LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1)); mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1));
// Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button // Do not call base postBuild to not connect to mCloseSignal to not close all floaters via Close button
// mTabContainer will be initialized in LLMultiFloater::addChild() // mTabContainer will be initialized in LLMultiFloater::addChild()
return TRUE; return TRUE;
......
...@@ -62,7 +62,7 @@ class LLIMFloaterContainer : public LLMultiFloater ...@@ -62,7 +62,7 @@ class LLIMFloaterContainer : public LLMultiFloater
private: private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t; typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
avatarID_panel_map_t mSessions; avatarID_panel_map_t mSessions;
boost::signals2::connection mNewMessageConnection;
void onNewMessageReceived(const LLSD& data); void onNewMessageReceived(const LLSD& data);
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment