aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
authorUbitUmarov2016-08-19 14:17:57 +0100
committerUbitUmarov2016-08-19 14:17:57 +0100
commit6703be2a90f6e6bce9803e191a1fcc6e9be80fe7 (patch)
tree49eef7fa0da85c5f8b1e1bc9e6794c0dd47945e5 /OpenSim/Region/ScriptEngine/Shared/Instance
parent catch some NULL refs (diff)
downloadopensim-SC-6703be2a90f6e6bce9803e191a1fcc6e9be80fe7.zip
opensim-SC-6703be2a90f6e6bce9803e191a1fcc6e9be80fe7.tar.gz
opensim-SC-6703be2a90f6e6bce9803e191a1fcc6e9be80fe7.tar.bz2
opensim-SC-6703be2a90f6e6bce9803e191a1fcc6e9be80fe7.tar.xz
do not enqueue next event processing if script is in SelfDelete state
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 674144b..f75a5d4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -807,9 +807,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
807 lock (EventQueue) 807 lock (EventQueue)
808 { 808 {
809 data = (EventParams)EventQueue.Dequeue(); 809 data = (EventParams)EventQueue.Dequeue();
810 if (data == null) // Shouldn't happen 810 if (data == null)
811 { 811 {
812 if (EventQueue.Count > 0 && Running && !ShuttingDown) 812 // check if a null event was enqueued or if its really empty
813 if (EventQueue.Count > 0 && Running && !ShuttingDown && !m_InSelfDelete)
813 { 814 {
814 m_CurrentWorkItem = Engine.QueueEventHandler(this); 815 m_CurrentWorkItem = Engine.QueueEventHandler(this);
815 } 816 }
@@ -979,7 +980,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
979 ScriptTask.ItemID, ScriptTask.AssetID, data.EventName, EventsProcessed); 980 ScriptTask.ItemID, ScriptTask.AssetID, data.EventName, EventsProcessed);
980 } 981 }
981 982
982 if (EventQueue.Count > 0 && Running && !ShuttingDown) 983 if (EventQueue.Count > 0 && Running && !ShuttingDown && !m_InSelfDelete)
983 { 984 {
984 m_CurrentWorkItem = Engine.QueueEventHandler(this); 985 m_CurrentWorkItem = Engine.QueueEventHandler(this);
985 } 986 }