Prevent error spew when script send IM to HG users before HG is up

melanie
Melanie Thielker 2017-03-31 13:51:42 +01:00
parent 5c3cb5297c
commit 59f7cf79c9
1 changed files with 8 additions and 3 deletions

View File

@ -957,9 +957,14 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
public virtual bool IsLocalGridUser(UUID uuid)
{
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid);
if (account == null || (account != null && !account.LocalToGrid))
return false;
lock (m_Scenes)
{
if (m_Scenes.Count == 0)
return true;
UserAccount account = m_Scenes[0].UserAccountService.GetUserAccount(m_Scenes[0].RegionInfo.ScopeID, uuid);
if (account == null || (account != null && !account.LocalToGrid))
return false;
}
return true;
}