Skip to content

Commit

Permalink
Merge pull request #2578 from secondlife/brad/2550-plugin-shutdown-crash
Browse files Browse the repository at this point in the history
Fix for crash in LLPluginProcessParent during early shutdown.
  • Loading branch information
brad-linden committed Sep 16, 2024
2 parents 2f38f06 + e3c3cc6 commit 7594e3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion indra/llplugin/llpluginprocessparent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LLPluginProcessParentOwner::~LLPluginProcessParentOwner()
bool LLPluginProcessParent::sUseReadThread = false;
apr_pollset_t *LLPluginProcessParent::sPollSet = NULL;
bool LLPluginProcessParent::sPollsetNeedsRebuild = false;
LLCoros::Mutex *LLPluginProcessParent::sInstancesMutex;
LLCoros::Mutex *LLPluginProcessParent::sInstancesMutex = nullptr;
LLPluginProcessParent::mapInstances_t LLPluginProcessParent::sInstances;
LLThread *LLPluginProcessParent::sReadThread = NULL;

Expand Down Expand Up @@ -155,6 +155,12 @@ LLPluginProcessParent::ptr_t LLPluginProcessParent::create(LLPluginProcessParent
/*static*/
void LLPluginProcessParent::shutdown()
{
if (!sInstancesMutex)
{
// setup was not complete, skip shutdown
return;
}

LLCoros::LockType lock(*sInstancesMutex);

mapInstances_t::iterator it;
Expand Down

0 comments on commit 7594e3b

Please sign in to comment.