Guard against the null UUID being queried from the userserver

repeatedly.
This commit is contained in:
Melanie Thielker
2008-08-16 03:18:21 +00:00
parent 9807a86398
commit e5a7ba5df4

View File

@@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="userID"></param>
public void AddNewUser(LLUUID userID)
{
if(userID == LLUUID.Zero)
return;
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
GetUserDetails(userID);
}
@@ -130,6 +132,9 @@ namespace OpenSim.Framework.Communications.Cache
/// <returns>null if no user details are found</returns>
public CachedUserInfo GetUserDetails(LLUUID userID)
{
if(userID == LLUUID.Zero)
return null;
lock (m_userProfiles)
{
if (m_userProfiles.ContainsKey(userID))