Prevent AO from crashing the sim if the user logs out before the script

stops
This commit is contained in:
Melanie Thielker
2008-11-10 05:42:02 +00:00
parent dd688e95e0
commit 0d02f53f87

View File

@@ -3492,6 +3492,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
UUID avatar = (UUID)id;
ScenePresence presence = World.GetScenePresence(avatar);
if (presence == null)
return "";
if (m_host.RegionHandle == presence.RegionHandle)
{
Dictionary<UUID, string> animationstateNames = AnimationSet.Animations.AnimStateNames;