aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-16 03:18:21 +0000
committerMelanie Thielker2008-08-16 03:18:21 +0000
commite5a7ba5df4098aa0e7c24487736b07d7ede0d7e6 (patch)
tree5065cc4fba6eaaa382b1b7881efe1e622ca4b64d /OpenSim/Framework/Communications
parentGuard against a null ref in the permissions module when a profile (diff)
downloadopensim-SC-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.zip
opensim-SC-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.gz
opensim-SC-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.bz2
opensim-SC-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.xz
Guard against the null UUID being queried from the userserver
repeatedly.
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 2bc8dcd..f96b15e 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -65,6 +65,8 @@ namespace OpenSim.Framework.Communications.Cache
65 /// <param name="userID"></param> 65 /// <param name="userID"></param>
66 public void AddNewUser(LLUUID userID) 66 public void AddNewUser(LLUUID userID)
67 { 67 {
68 if(userID == LLUUID.Zero)
69 return;
68 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); 70 m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
69 GetUserDetails(userID); 71 GetUserDetails(userID);
70 } 72 }
@@ -130,6 +132,9 @@ namespace OpenSim.Framework.Communications.Cache
130 /// <returns>null if no user details are found</returns> 132 /// <returns>null if no user details are found</returns>
131 public CachedUserInfo GetUserDetails(LLUUID userID) 133 public CachedUserInfo GetUserDetails(LLUUID userID)
132 { 134 {
135 if(userID == LLUUID.Zero)
136 return null;
137
133 lock (m_userProfiles) 138 lock (m_userProfiles)
134 { 139 {
135 if (m_userProfiles.ContainsKey(userID)) 140 if (m_userProfiles.ContainsKey(userID))