avoid using new c# sintaxe that will fail on older compilers

0.9.1.0-post-fixes
UbitUmarov 2018-08-30 20:09:12 +01:00
parent 9647a1e6c5
commit 50627304a6
1 changed files with 5 additions and 3 deletions

View File

@ -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);