SL-11718 Another exit crash

meow-7.2.2
andreykproductengine 2019-09-05 15:13:56 +03:00
parent e1451bb1d1
commit fe0b881acc
2 changed files with 15 additions and 7 deletions

View File

@ -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();
}
//--------------------------------------------------------------------------

View File

@ -46,6 +46,7 @@ class LLChannelManager : public LLSingleton<LLChannelManager>
LLSINGLETON(LLChannelManager);
virtual ~LLChannelManager();
void cleanupSingleton();
public: