delay texture entry parsing until absolutely necessary while converting legacy materials

master-beforevarregion
dahlia 2014-01-20 03:02:30 -08:00
parent 28723beb0c
commit 95c926b2cd
1 changed files with 4 additions and 4 deletions

View File

@ -159,10 +159,6 @@ namespace OpenSim.Region.OptionalModules.Materials
if (part.DynAttrs == null)
return;
var te = new Primitive.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length);
if (te == null)
return;
OSD OSMaterials = null;
OSDArray matsArr = null;
@ -187,6 +183,10 @@ namespace OpenSim.Region.OptionalModules.Materials
if (matsArr == null)
return;
var te = new Primitive.TextureEntry(part.Shape.TextureEntry, 0, part.Shape.TextureEntry.Length);
if (te == null)
return;
foreach (OSD elemOsd in matsArr)
{
if (elemOsd != null && elemOsd is OSDMap)