diff options
author | Mike Mazur | 2008-07-23 08:03:32 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-23 08:03:32 +0000 |
commit | 003487631d0715ece515990d6b32b677a122e26b (patch) | |
tree | 57fede0ed6b7d47a5e97b7c778e2bd618f7c3dfc /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | adding files that were not included in r5589 (diff) | |
download | opensim-SC_OLD-003487631d0715ece515990d6b32b677a122e26b.zip opensim-SC_OLD-003487631d0715ece515990d6b32b677a122e26b.tar.gz opensim-SC_OLD-003487631d0715ece515990d6b32b677a122e26b.tar.bz2 opensim-SC_OLD-003487631d0715ece515990d6b32b677a122e26b.tar.xz |
Fix issue 1760. If the inventory item is not found, llSay() and throw an exception.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index f3e9b09..ac4d43a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2770,7 +2770,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2770 | break; | 2770 | break; |
2771 | } | 2771 | } |
2772 | } | 2772 | } |
2773 | 2773 | ||
2774 | if (!found) | ||
2775 | { | ||
2776 | llSay(0, String.Format("Could not find object '{0}'", inventory)); | ||
2777 | throw new Exception(String.Format("The inventory object '{0}' could not be found", inventory)); | ||
2778 | } | ||
2779 | |||
2774 | // check if destination is an avatar | 2780 | // check if destination is an avatar |
2775 | if (World.GetScenePresence(destId) != null) | 2781 | if (World.GetScenePresence(destId) != null) |
2776 | { | 2782 | { |
@@ -2782,9 +2788,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2782 | // destination is an object | 2788 | // destination is an object |
2783 | World.MoveTaskInventoryItem(destId, m_host, objId); | 2789 | World.MoveTaskInventoryItem(destId, m_host, objId); |
2784 | } | 2790 | } |
2785 | |||
2786 | if (!found) | ||
2787 | llSay(0, "Could not find object " + inventory); | ||
2788 | } | 2791 | } |
2789 | 2792 | ||
2790 | public void llRemoveInventory(string item) | 2793 | public void llRemoveInventory(string item) |