Skip to content
Snippets Groups Projects
Commit fe0b881a authored by andreykproductengine's avatar andreykproductengine
Browse files

SL-11718 Another exit crash

parent e1451bb1
No related branches found
No related tags found
No related merge requests found
...@@ -58,15 +58,22 @@ LLChannelManager::LLChannelManager() ...@@ -58,15 +58,22 @@ LLChannelManager::LLChannelManager()
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
LLChannelManager::~LLChannelManager() LLChannelManager::~LLChannelManager()
{ {
for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it) }
{
LLScreenChannelBase* channel = it->channel.get();
if (!channel) continue;
delete channel; //--------------------------------------------------------------------------
} void LLChannelManager::cleanupSingleton()
{
// Note: LLScreenChannelBase is a LLUICtrl and depends onto other singletions
// not captured by singleton-dependency, so cleanup it here instead of destructor
for (std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
{
LLScreenChannelBase* channel = it->channel.get();
if (!channel) continue;
mChannelList.clear(); delete channel;
}
mChannelList.clear();
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
......
...@@ -46,6 +46,7 @@ class LLChannelManager : public LLSingleton<LLChannelManager> ...@@ -46,6 +46,7 @@ class LLChannelManager : public LLSingleton<LLChannelManager>
LLSINGLETON(LLChannelManager); LLSINGLETON(LLChannelManager);
virtual ~LLChannelManager(); virtual ~LLChannelManager();
void cleanupSingleton();
public: public:
......
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