diff options
author | Melanie Thielker | 2010-08-14 14:00:12 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-08-14 14:00:12 +0200 |
commit | f2d7f3e731659bbfcecf5a0846f711fcc38237f0 (patch) | |
tree | 0959ceadcc72393da36d48fc29b785b84fc45917 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Fix a possible nullref in BestAvatarResponsiveness policy (diff) | |
parent | clearing some debugmessages (diff) | |
download | opensim-SC-f2d7f3e731659bbfcecf5a0846f711fcc38237f0.zip opensim-SC-f2d7f3e731659bbfcecf5a0846f711fcc38237f0.tar.gz opensim-SC-f2d7f3e731659bbfcecf5a0846f711fcc38237f0.tar.bz2 opensim-SC-f2d7f3e731659bbfcecf5a0846f711fcc38237f0.tar.xz |
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 1486e2a..9bece31 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4200,25 +4200,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4200 | { | 4200 | { |
4201 | m_host.AddScriptLPS(1); | 4201 | m_host.AddScriptLPS(1); |
4202 | 4202 | ||
4203 | List<TaskInventoryItem> inv; | ||
4203 | try | 4204 | try |
4204 | { | 4205 | { |
4205 | m_host.TaskInventory.LockItemsForRead(true); | 4206 | m_host.TaskInventory.LockItemsForRead(true); |
4206 | foreach (TaskInventoryItem item in m_host.TaskInventory.Values) | 4207 | inv = new List<TaskInventoryItem>(m_host.TaskInventory.Values); |
4207 | { | ||
4208 | if (item.Name == name) | ||
4209 | { | ||
4210 | if (item.ItemID == m_itemID) | ||
4211 | throw new ScriptDeleteException(); | ||
4212 | else | ||
4213 | m_host.Inventory.RemoveInventoryItem(item.ItemID); | ||
4214 | return; | ||
4215 | } | ||
4216 | } | ||
4217 | } | 4208 | } |
4218 | finally | 4209 | finally |
4219 | { | 4210 | { |
4220 | m_host.TaskInventory.LockItemsForRead(false); | 4211 | m_host.TaskInventory.LockItemsForRead(false); |
4221 | } | 4212 | } |
4213 | foreach (TaskInventoryItem item in inv) | ||
4214 | { | ||
4215 | if (item.Name == name) | ||
4216 | { | ||
4217 | if (item.ItemID == m_itemID) | ||
4218 | throw new ScriptDeleteException(); | ||
4219 | else | ||
4220 | m_host.Inventory.RemoveInventoryItem(item.ItemID); | ||
4221 | return; | ||
4222 | } | ||
4223 | } | ||
4222 | } | 4224 | } |
4223 | 4225 | ||
4224 | public void llSetText(string text, LSL_Vector color, double alpha) | 4226 | public void llSetText(string text, LSL_Vector color, double alpha) |