From 50627304a626aa0c7df51d2ecd7a30924acc9890 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 30 Aug 2018 20:09:12 +0100 Subject: [PATCH] avoid using new c# sintaxe that will fail on older compilers --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 8 +++++--- 1 file 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 d2eecea012..c4f2ef7f62 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 if (dm == null) return; - if (!UUID.TryParse(agentID, out UUID avatarID)) + UUID avatarID; + if (!UUID.TryParse(agentID, out avatarID)) return; - if (!World.TryGetScenePresence(avatarID, out ScenePresence sp)) + ScenePresence sp = null; + if (!World.TryGetScenePresence(avatarID, out sp)) return; - if (sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) + if (sp == null || sp.IsChildAgent || sp.IsDeleted || sp.IsInTransit || sp.IsNPC) return; dm.SendAlertToUser(sp.ControllingClient, msg + "\n", false);