From ab4e6a02a52bfd473ea3c2050774103ec8eb3934 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 11 May 2012 00:37:20 +0100 Subject: [PATCH] If a bot is not connected, show region name "(none)" instead of throwing an exception in the "show bots" command of pCampbot --- OpenSim/Tools/pCampBot/BotManager.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 0f501b788b..fd32a6aa6e 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs @@ -302,9 +302,11 @@ namespace pCampBot { foreach (Bot pb in m_lBot) { + Simulator currentSim = pb.Client.Network.CurrentSim; + MainConsole.Instance.OutputFormat( outputFormat, - pb.Name, pb.Client.Network.CurrentSim.Name, pb.IsConnected ? "Connected" : "Disconnected"); + pb.Name, currentSim != null ? currentSim.Name : "(none)", pb.IsConnected ? "Connected" : "Disconnected"); } } }