Guard against a null ref in the permissions module when a profile

fetch fails.
0.6.0-stable
Melanie Thielker 2008-08-16 02:57:47 +00:00
parent 5ed5d0788b
commit 9807a86398
1 changed files with 5 additions and 2 deletions

View File

@ -247,8 +247,11 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
return true;
}
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(user);
if(profile.UserProfile.GodLevel >= 200 && m_allowGridGods)
return true;
if(profile != null && profile.UserProfile != null)
{
if(profile.UserProfile.GodLevel >= 200 && m_allowGridGods)
return true;
}
return false;
}