avoid a null ref

httptests
UbitUmarov 2017-05-11 23:46:06 +01:00
parent 97d02ecf32
commit 19d141c9a5
1 changed files with 2 additions and 2 deletions

View File

@ -12569,11 +12569,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
int maxWearablesLoop = cachedtex.WearableData.Length; int maxWearablesLoop = cachedtex.WearableData.Length;
if (maxWearablesLoop > cacheItems.Length)
maxWearablesLoop = cacheItems.Length;
if (cacheItems != null) if (cacheItems != null)
{ {
if (maxWearablesLoop > cacheItems.Length)
maxWearablesLoop = cacheItems.Length;
for (int i = 0; i < maxWearablesLoop; i++) for (int i = 0; i < maxWearablesLoop; i++)
{ {
int idx = cachedtex.WearableData[i].TextureIndex; int idx = cachedtex.WearableData[i].TextureIndex;