Guard against the null UUID being queried from the userserver

repeatedly.
0.6.0-stable
Melanie Thielker 2008-08-16 03:18:21 +00:00
parent 9807a86398
commit e5a7ba5df4
1 changed files with 5 additions and 0 deletions

View File

@ -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))