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

stops
0.6.1-post-fixes
Melanie Thielker 2008-11-10 05:42:02 +00:00
parent dd688e95e0
commit 0d02f53f87
1 changed files with 3 additions and 0 deletions

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;