From 59d19f038a3fdac0c347844c7884e813f5c5c136 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 10 Jul 2013 08:55:54 -0700 Subject: Remove a null reference exception in SimianPresenceServiceConnector that occurs when GetGridUserInfo cannot find the requested user info. --- .../Connectors/SimianGrid/SimianPresenceServiceConnector.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services/Connectors/SimianGrid') diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 0a39088..01163aa 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -315,11 +315,15 @@ namespace OpenSim.Services.Connectors.SimianGrid UUID userID = new UUID(user); 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()); - return null; + if (userResponse == 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 -- cgit v1.1