#4918 Crash at LLPluginProcessParent::poll

Bugsplat shows that mutex is null.
It's possible that no instances exist thus mutex wasn't initialized.
master
Andrey Kleshchev 2025-10-31 18:47:01 +02:00
parent a125524085
commit f7516a4631
1 changed files with 11 additions and 8 deletions

View File

@ -982,15 +982,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;
}
}
}