diff options
author | Justin Clark-Casey (justincc) | 2014-08-15 22:43:55 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-08-15 22:44:31 +0100 |
commit | 3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5 (patch) | |
tree | 32bb6a95cc2aa04d5b0b8a275ae4491c2540bc55 /OpenSim/Tools/pCampBot/Bot.cs | |
parent | Resolve a small race condition on removing bot behaviours that might leave pr... (diff) | |
download | opensim-SC_OLD-3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5.zip opensim-SC_OLD-3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5.tar.gz opensim-SC_OLD-3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5.tar.bz2 opensim-SC_OLD-3a643e24560a8200dd99a855d1cc7ed1d3b4b9c5.tar.xz |
Don't allow the last behavior to be removed from a pCampbot bot
If you want to stop existing behavious, add the None behaviour.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Tools/pCampBot/Bot.cs | 3 |
1 files changed, 3 insertions, 0 deletions
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 | |||
208 | 208 | ||
209 | public bool RemoveBehaviour(string abbreviatedName) | 209 | public bool RemoveBehaviour(string abbreviatedName) |
210 | { | 210 | { |
211 | if (Behaviours.Count <= 0) | ||
212 | return false; | ||
213 | |||
211 | Dictionary<string, IBehaviour> updatedBehaviours = new Dictionary<string, IBehaviour>(Behaviours); | 214 | Dictionary<string, IBehaviour> updatedBehaviours = new Dictionary<string, IBehaviour>(Behaviours); |
212 | IBehaviour behaviour; | 215 | IBehaviour behaviour; |
213 | 216 | ||