Make sure that keys exist in arrays before trying to access them.
parent
90d1ef9e4a
commit
f4726f4bcc
|
@ -147,6 +147,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
TimeSpan cacheTimeout = new TimeSpan(0,0, m_clientRequestIDFlushTimeOut / 1000);
|
TimeSpan cacheTimeout = new TimeSpan(0,0, m_clientRequestIDFlushTimeOut / 1000);
|
||||||
UUID[] CurrentKeys = new UUID[m_clientRequestIDInfo.Count];
|
UUID[] CurrentKeys = new UUID[m_clientRequestIDInfo.Count];
|
||||||
foreach (UUID key in CurrentKeys)
|
foreach (UUID key in CurrentKeys)
|
||||||
|
{
|
||||||
|
if (m_clientRequestIDInfo.ContainsKey(key))
|
||||||
{
|
{
|
||||||
if (DateTime.Now - m_clientRequestIDInfo[key].LastUsedTMStamp > cacheTimeout)
|
if (DateTime.Now - m_clientRequestIDInfo[key].LastUsedTMStamp > cacheTimeout)
|
||||||
{
|
{
|
||||||
|
@ -155,6 +157,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void AddRegion(Scene scene)
|
public void AddRegion(Scene scene)
|
||||||
{
|
{
|
||||||
|
@ -475,10 +478,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
OSDMap binBucketOSD = (OSDMap)OSDParser.DeserializeLLSDXml(binBucket);
|
OSDMap binBucketOSD = (OSDMap)OSDParser.DeserializeLLSDXml(binBucket);
|
||||||
|
|
||||||
foreach (string key in binBucketOSD.Keys)
|
foreach (string key in binBucketOSD.Keys)
|
||||||
|
{
|
||||||
|
if (binBucketOSD.ContainsKey(key))
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString());
|
m_log.WarnFormat("{0}: {1}", key, binBucketOSD[key].ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// treat as if no attachment
|
// treat as if no attachment
|
||||||
bucket = new byte[19];
|
bucket = new byte[19];
|
||||||
|
|
Loading…
Reference in New Issue