Protect a check for default texture entry when setting alpha values. Apparently
if all faces have their own textures then the default texture is nullbulletsim
parent
afd5469eec
commit
ce011d7e44
|
@ -1619,9 +1619,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
tex.FaceTextures[i].RGBA = texcolor;
|
tex.FaceTextures[i].RGBA = texcolor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
texcolor = tex.DefaultTexture.RGBA;
|
|
||||||
texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
|
// In some cases, the default texture can be null, eg when every face
|
||||||
tex.DefaultTexture.RGBA = texcolor;
|
// has a unique texture
|
||||||
|
if (tex.DefaultTexture != null)
|
||||||
|
{
|
||||||
|
texcolor = tex.DefaultTexture.RGBA;
|
||||||
|
texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
|
||||||
|
tex.DefaultTexture.RGBA = texcolor;
|
||||||
|
}
|
||||||
|
|
||||||
part.UpdateTexture(tex);
|
part.UpdateTexture(tex);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue