Fix a bug in pCampbot grabbing behaviour where an exception would be thrown if the bot was not yet aware of any objects.
parent
69a5beeabc
commit
5f500c89ce
|
@ -47,6 +47,9 @@ namespace pCampBot
|
|||
{
|
||||
Dictionary<UUID, Primitive> objects = Bot.Objects;
|
||||
|
||||
if (objects.Count <= 0)
|
||||
return;
|
||||
|
||||
Primitive prim = objects.ElementAt(Bot.Random.Next(0, objects.Count - 1)).Value;
|
||||
|
||||
// This appears to be a typical message sent when a viewer user clicks a clickable object
|
||||
|
|
Loading…
Reference in New Issue