aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index d2eecea..c4f2ef7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -651,13 +651,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
651 if (dm == null) 651 if (dm == null)
652 return; 652 return;
653 653
654 if (!UUID.TryParse(agentID, out UUID avatarID)) 654 UUID avatarID;
655 if (!UUID.TryParse(agentID, out avatarID))
655 return; 656 return;
656 657
657 if (!World.TryGetScenePresence(avatarID, out ScenePresence sp)) 658 ScenePresence sp = null;
659 if (!World.TryGetScenePresence(avatarID, out sp))
658 return; 660 return;
659 661
660 if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) 662 if (sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC)
661 return; 663 return;
662 664
663 dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false); 665 dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);