From 8014ce7f1aaec0c418248e2e24a65c3cff0b3d27 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 15 Sep 2014 23:15:27 +0200 Subject: Fix a nullref in a debug message. If we have no SceneAgent, we can't output data from it. --- OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 3539100..99e7aba 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -2055,12 +2055,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP { ClientLogoutsDueToNoReceives++; - m_log.WarnFormat( - "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", - client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, m_scene.Name); + if (client.SceneAgent != null) + { + m_log.WarnFormat( + "[LLUDPSERVER]: No packets received from {0} agent of {1} for {2}ms in {3}. Disconnecting.", + client.SceneAgent.IsChildAgent ? "child" : "root", client.Name, timeoutTicks, m_scene.Name); - if (client.SceneAgent != null && !client.SceneAgent.IsChildAgent) - client.Kick("Simulator logged you out due to connection timeout."); + if (!client.SceneAgent.IsChildAgent) + client.Kick("Simulator logged you out due to connection timeout."); + } } if (!m_scene.CloseAgent(client.AgentId, true)) -- cgit v1.1