Guard against occurring null ref.

LSLKeyTest
Diva Canto 2016-06-18 17:00:15 -07:00
parent fe1f01defb
commit 206faf0218
1 changed files with 1 additions and 1 deletions

View File

@ -2571,7 +2571,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
AgentPrefs prefs = AgentPreferencesService.GetAgentPreferences(ownerID); AgentPrefs prefs = AgentPreferencesService.GetAgentPreferences(ownerID);
// Only apply user selected prefs if the user set them // Only apply user selected prefs if the user set them
if (prefs.PermNextOwner != 0) if (prefs != null && prefs.PermNextOwner != 0)
{ {
sceneObject.RootPart.GroupMask = (uint)prefs.PermGroup; sceneObject.RootPart.GroupMask = (uint)prefs.PermGroup;
sceneObject.RootPart.EveryoneMask = (uint)prefs.PermEveryone; sceneObject.RootPart.EveryoneMask = (uint)prefs.PermEveryone;