diff options
Diffstat (limited to 'indra/llplugin/llpluginprocessparent.cpp')
| -rw-r--r-- | indra/llplugin/llpluginprocessparent.cpp | 19 | 
1 files changed, 11 insertions, 8 deletions
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp index d6ab52a17a..3deee2fb3e 100644 --- a/indra/llplugin/llpluginprocessparent.cpp +++ b/indra/llplugin/llpluginprocessparent.cpp @@ -985,15 +985,18 @@ void LLPluginProcessParent::poll(F64 timeout)          }      } -    // Remove instances in the done state from the sInstances map. -    LLCoros::LockType lock(*sInstancesMutex); -    mapInstances_t::iterator itClean = sInstances.begin(); -    while (itClean != sInstances.end()) +    if (sInstancesMutex)      { -        if ((*itClean).second->isDone()) -            itClean = sInstances.erase(itClean); -        else -            ++itClean; +        // Remove instances in the done state from the sInstances map. +        LLCoros::LockType lock(*sInstancesMutex); +        mapInstances_t::iterator itClean = sInstances.begin(); +        while (itClean != sInstances.end()) +        { +            if ((*itClean).second->isDone()) +                itClean = sInstances.erase(itClean); +            else +                ++itClean; +        }      }  }  | 
