mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
Actually remove the script if it tries to remove itself.
Fixes Mantis #2929
This commit is contained in:
@@ -3577,7 +3577,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
if (item.Name == name)
|
||||
{
|
||||
m_host.Inventory.RemoveInventoryItem(item.ItemID);
|
||||
if (item.ItemID == m_itemID)
|
||||
throw new ScriptDeleteException();
|
||||
else
|
||||
m_host.Inventory.RemoveInventoryItem(item.ItemID);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user