Remove a null reference exception in SimianPresenceServiceConnector that

occurs when GetGridUserInfo cannot find the requested user info.
cpu-performance
Robert Adams 2013-07-10 08:55:54 -07:00
parent 38e6da5522
commit 59d19f038a
1 changed files with 8 additions and 4 deletions

View File

@ -315,11 +315,15 @@ namespace OpenSim.Services.Connectors.SimianGrid
UUID userID = new UUID(user); UUID userID = new UUID(user);
OSDMap userResponse = GetUserData(userID); OSDMap userResponse = GetUserData(userID);
if (userResponse != null)
return ResponseToGridUserInfo(userResponse);
m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve user data for {0}: {1}",userID,userResponse["Message"].AsString()); if (userResponse == null)
return null; {
m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve user data for {0}", userID);
}
// Note that ResponseToGridUserInfo properly checks for and returns a null if passed a null.
return ResponseToGridUserInfo(userResponse);
} }
#endregion #endregion