diff options
author | Melanie Thielker | 2008-08-16 03:18:21 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-16 03:18:21 +0000 |
commit | e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6 (patch) | |
tree | 5065cc4fba6eaaa382b1b7881efe1e622ca4b64d /OpenSim/Framework/Communications/Cache | |
parent | Guard against a null ref in the permissions module when a profile (diff) | |
download | opensim-SC_OLD-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.zip opensim-SC_OLD-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.gz opensim-SC_OLD-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.bz2 opensim-SC_OLD-e5a7ba5df4098aa0e7c24487736b07d7ede0d7e6.tar.xz |
Guard against the null UUID being queried from the userserver
repeatedly.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | 5 |
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)) |