Guard against the null UUID being queried from the userserver
repeatedly.0.6.0-stable
parent
9807a86398
commit
e5a7ba5df4
|
@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
/// <param name="userID"></param>
|
/// <param name="userID"></param>
|
||||||
public void AddNewUser(LLUUID userID)
|
public void AddNewUser(LLUUID userID)
|
||||||
{
|
{
|
||||||
|
if(userID == LLUUID.Zero)
|
||||||
|
return;
|
||||||
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
|
||||||
GetUserDetails(userID);
|
GetUserDetails(userID);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +132,9 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
/// <returns>null if no user details are found</returns>
|
/// <returns>null if no user details are found</returns>
|
||||||
public CachedUserInfo GetUserDetails(LLUUID userID)
|
public CachedUserInfo GetUserDetails(LLUUID userID)
|
||||||
{
|
{
|
||||||
|
if(userID == LLUUID.Zero)
|
||||||
|
return null;
|
||||||
|
|
||||||
lock (m_userProfiles)
|
lock (m_userProfiles)
|
||||||
{
|
{
|
||||||
if (m_userProfiles.ContainsKey(userID))
|
if (m_userProfiles.ContainsKey(userID))
|
||||||
|
|
Loading…
Reference in New Issue