diff options
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index ad1a358..5dbd9ec 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -957,16 +957,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
957 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; | 957 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; |
958 | if (target != null) | 958 | if (target != null) |
959 | { | 959 | { |
960 | UUID animID = UUID.Zero; | 960 | UUID animID = new UUID(); |
961 | lock (m_host.TaskInventory) | 961 | if (!UUID.TryParse(animation, out animID)) |
962 | { | 962 | { |
963 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) | 963 | animID = UUID.Zero; |
964 | lock (m_host.TaskInventory) | ||
964 | { | 965 | { |
965 | if (inv.Value.Name == animation) | 966 | foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) |
966 | { | 967 | { |
967 | if (inv.Value.Type == (int)AssetType.Animation) | 968 | if (inv.Value.Name == animation) |
968 | animID = inv.Value.AssetID; | 969 | { |
969 | continue; | 970 | if (inv.Value.Type == (int)AssetType.Animation) |
971 | animID = inv.Value.AssetID; | ||
972 | continue; | ||
973 | } | ||
970 | } | 974 | } |
971 | } | 975 | } |
972 | } | 976 | } |