mantis 8165: fix a null ref on hg gatekeeper on another place

0.9.0-post-fixes
UbitUmarov 2017-05-12 15:22:16 +01:00
parent 5e577baa10
commit d08df7bda7
1 changed files with 4 additions and 3 deletions

View File

@ -376,7 +376,8 @@ namespace OpenSim.Services.HypergridService
return false; return false;
} }
if(aCircuit.AgentID == new UUID("6571e388-6218-4574-87db-f9379718315e")) UUID agentID = aCircuit.AgentID;
if(agentID == new UUID("6571e388-6218-4574-87db-f9379718315e"))
{ {
// really? // really?
reason = "Invalid account ID"; reason = "Invalid account ID";
@ -385,14 +386,14 @@ namespace OpenSim.Services.HypergridService
if(m_GridUserService != null) if(m_GridUserService != null)
{ {
string PrincipalIDstr = account.PrincipalID.ToString(); string PrincipalIDstr = agentID.ToString();
GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(PrincipalIDstr); GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(PrincipalIDstr);
if(!m_allowDuplicatePresences) if(!m_allowDuplicatePresences)
{ {
if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero) if(guinfo != null && guinfo.Online && guinfo.LastRegionID != UUID.Zero)
{ {
if(SendAgentGodKillToRegion(UUID.Zero, account.PrincipalID, guinfo)) if(SendAgentGodKillToRegion(UUID.Zero, agentID, guinfo))
{ {
m_log.InfoFormat( m_log.InfoFormat(
"[GATEKEEPER SERVICE]: Login failed for {0} {1}, reason: already logged in", "[GATEKEEPER SERVICE]: Login failed for {0} {1}, reason: already logged in",