diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 6fbc410758..99be46d638 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -773,7 +773,10 @@ namespace OpenSim.Region.Framework.Scenes m_localId = m_scene.AllocateLocalId(); UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, m_uuid); - m_userFlags = account.UserFlags; + if (account != null) + m_userFlags = account.UserFlags; + else + m_userFlags = 0; if (account != null) UserLevel = account.UserLevel;