diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 6372247..9f67dc1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -874,6 +874,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
874 | private string m_Assembly; | 874 | private string m_Assembly; |
875 | private int m_StartParam = 0; | 875 | private int m_StartParam = 0; |
876 | private string m_CurrentEvent = String.Empty; | 876 | private string m_CurrentEvent = String.Empty; |
877 | private bool m_InSelfDelete = false; | ||
877 | 878 | ||
878 | private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); | 879 | private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); |
879 | 880 | ||
@@ -1190,7 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1190 | if (result == null) | 1191 | if (result == null) |
1191 | return true; | 1192 | return true; |
1192 | 1193 | ||
1193 | result.Abort(); | 1194 | if(!m_InSelfDelete) |
1195 | result.Abort(); | ||
1194 | 1196 | ||
1195 | lock (m_EventQueue) | 1197 | lock (m_EventQueue) |
1196 | { | 1198 | { |
@@ -1298,7 +1300,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1298 | m_InEvent = false; | 1300 | m_InEvent = false; |
1299 | m_CurrentEvent = String.Empty; | 1301 | m_CurrentEvent = String.Empty; |
1300 | 1302 | ||
1301 | if (!(e is TargetInvocationException) || !(e.InnerException is EventAbortException)) | 1303 | if (!(e is TargetInvocationException) || (!(e.InnerException is EventAbortException) && (!(e.InnerException is SelfDeleteException)))) |
1302 | { | 1304 | { |
1303 | if (e is System.Threading.ThreadAbortException) | 1305 | if (e is System.Threading.ThreadAbortException) |
1304 | { | 1306 | { |
@@ -1340,6 +1342,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1340 | e.ToString()); | 1342 | e.ToString()); |
1341 | } | 1343 | } |
1342 | } | 1344 | } |
1345 | else if((e is TargetInvocationException) && (e.InnerException is SelfDeleteException)) | ||
1346 | { | ||
1347 | m_InSelfDelete = true; | ||
1348 | if(part != null && part.ParentGroup != null) | ||
1349 | m_Engine.World.DeleteSceneObject(part.ParentGroup); | ||
1350 | } | ||
1343 | } | 1351 | } |
1344 | } | 1352 | } |
1345 | 1353 | ||