diff options
author | Brad Linden <46733234+brad-linden@users.noreply.github.com> | 2024-09-16 14:46:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-16 14:46:21 -0700 |
commit | 7594e3b71b24313b351ab4ca69899aa8584c0c1b (patch) | |
tree | db060ec468905a3b071a8d62b8b93e3e8b48b3f0 | |
parent | 2f38f0685cf3031f6108de2a7c312aa4cf0462bd (diff) | |
parent | e3c3cc636e66043fa89f402c9f132c208f0217cd (diff) |
Merge pull request #2578 from secondlife/brad/2550-plugin-shutdown-crash
Fix for crash in LLPluginProcessParent during early shutdown.
-rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index bd1e19c294..908f3c8ff5 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -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; @@ -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; |