test for null return from DynAttrs.GetStore()

cpu-performance
dahlia 2013-06-27 17:53:15 -07:00
parent 149487ea0f
commit c1b8f83dd4
1 changed files with 3 additions and 0 deletions

View File

@ -590,6 +590,9 @@ namespace OpenSim.Region.OptionalModules.MaterialsDemoModule
if (part.DynAttrs.ContainsStore("OpenSim", "Materials"))
{
OSDMap materialsStore = part.DynAttrs.GetStore("OpenSim", "Materials");
if (materialsStore == null)
return;
materialsStore.TryGetValue("Materials", out osdMaterials);
}