summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-09-05 15:13:56 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-09-05 15:13:56 +0300
commitfe0b881acc575df35904bf4f26028ad76007eba9 (patch)
treedbc9a60f955ab7e964ba9915a9e4f8208c2017b8 /indra/newview
parente1451bb1d1df2c122874d3962b1a91cb6a913ca3 (diff)
SL-11718 Another exit crash
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchannelmanager.cpp21
-rw-r--r--indra/newview/llchannelmanager.h1
2 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index d6240838b6..0b7b9cbbc7 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -58,15 +58,22 @@ 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();
}
//--------------------------------------------------------------------------
diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h
index 8b9d0dda8b..8abe350196 100644
--- a/indra/newview/llchannelmanager.h
+++ b/indra/newview/llchannelmanager.h
@@ -46,6 +46,7 @@ class LLChannelManager : public LLSingleton<LLChannelManager>
LLSINGLETON(LLChannelManager);
virtual ~LLChannelManager();
+ void cleanupSingleton();
public: