safeguard against unknown material replacemet

melanie
UbitUmarov 2016-11-23 20:26:14 +00:00
parent b3eda582ec
commit 72e20028d1
1 changed files with 1 additions and 1 deletions

View File

@ -532,7 +532,7 @@ namespace OpenSim.Region.OptionalModules.Materials
lock(m_Materials)
{
if(oldid != UUID.Zero)
if(oldid != UUID.Zero && m_MaterialsRefCount.ContainsKey(oldid))
{
m_MaterialsRefCount[oldid]--;
if(m_MaterialsRefCount[oldid] <= 0)