From 90c814a7cace3bac3df451a8b184c32f462c4da2 Mon Sep 17 00:00:00 2001 From: Tom Grimshaw Date: Tue, 1 Jun 2010 13:29:12 -0700 Subject: Fix nullref in cmGetAvatarList() (ported from 0.69) --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index 3e62c1a..4fb5c95 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs @@ -125,9 +125,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (avatar.IsChildAgent == false) { - result.Add(avatar.UUID); - result.Add(avatar.PhysicsActor.Position); - result.Add(avatar.Name); + if (avatar.PhysicsActor != null && avatar.PhysicsActor.Position != null) + { + result.Add(avatar.UUID); + result.Add(avatar.PhysicsActor.Position); + result.Add(avatar.Name); + } } } }); -- cgit v1.1