add null texture entry face check before converting legacy materials

master-beforevarregion
dahlia 2014-01-20 11:53:33 -08:00
parent 4800303abd
commit 1cae3664a5
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ namespace OpenSim.Region.OptionalModules.Materials
bool used = false;
foreach (var face in te.FaceTextures)
if (face.MaterialID == id)
if (face != null && face.MaterialID == id)
used = true;
if (used)
@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Materials
var newId = StoreMaterialAsAsset(part.CreatorID, material, part);
foreach (var face in te.FaceTextures)
if (face.MaterialID == id)
if (face != null && face.MaterialID == id)
face.MaterialID = newId;
}
}