aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2018-08-30 20:09:12 +0100
committerUbitUmarov2018-08-30 20:09:12 +0100
commit50627304a626aa0c7df51d2ecd7a30924acc9890 (patch)
tree2aae7c8657389594e28f6f599827b84615902cb9 /OpenSim/Region
parentminor changes to last patch (diff)
downloadopensim-SC-50627304a626aa0c7df51d2ecd7a30924acc9890.zip
opensim-SC-50627304a626aa0c7df51d2ecd7a30924acc9890.tar.gz
opensim-SC-50627304a626aa0c7df51d2ecd7a30924acc9890.tar.bz2
opensim-SC-50627304a626aa0c7df51d2ecd7a30924acc9890.tar.xz
avoid using new c# sintaxe that will fail on older compilers
Diffstat (limited to 'OpenSim/Region')
-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);