From cb4ae39cb9591247629be9e4359f389491656799 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 6481e97eb7..1a715abe68 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"); } } }