aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-16 02:57:47 +0000
committerMelanie Thielker2008-08-16 02:57:47 +0000
commit9807a8639875aeb4a8594db3eda68009d96bba0c (patch)
treed6ddf4ac37e073d31c5df0519621c39129132ae3
parentMantis#1890. Thank you kindly, Godfrey, for a patch that addresses: (diff)
downloadopensim-SC-9807a8639875aeb4a8594db3eda68009d96bba0c.zip
opensim-SC-9807a8639875aeb4a8594db3eda68009d96bba0c.tar.gz
opensim-SC-9807a8639875aeb4a8594db3eda68009d96bba0c.tar.bz2
opensim-SC-9807a8639875aeb4a8594db3eda68009d96bba0c.tar.xz
Guard against a null ref in the permissions module when a profile
fetch fails.
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index c181087..10f4897 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -247,8 +247,11 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
247 return true; 247 return true;
248 } 248 }
249 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(user); 249 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
250 if(profile.UserProfile.GodLevel >= 200 && m_allowGridGods) 250 if(profile != null && profile.UserProfile != null)
251 return true; 251 {
252 if(profile.UserProfile.GodLevel >= 200 && m_allowGridGods)
253 return true;
254 }
252 255
253 return false; 256 return false;
254 } 257 }