diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 7 |
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 | } |