From 3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 15 Aug 2014 22:43:55 +0100 Subject: Don't allow the last behavior to be removed from a pCampbot bot If you want to stop existing behavious, add the None behaviour. --- OpenSim/Tools/pCampBot/Bot.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Tools/pCampBot/Bot.cs') diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index c043186..45a6682 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -208,6 +208,9 @@ namespace pCampBot public bool RemoveBehaviour(string abbreviatedName) { + if (Behaviours.Count <= 0) + return false; + Dictionary updatedBehaviours = new Dictionary(Behaviours); IBehaviour behaviour; -- cgit v1.1