Fix of scheduler.

When trace is off, the scheduler removed the link to placed schedules.
This was wrong due to a wrong weak table. Corrected.
This commit is contained in:
FlightControl
2017-03-02 23:33:54 +01:00
parent 082e1d5e2e
commit c476c7df27
3 changed files with 81 additions and 5 deletions

View File

@@ -64,7 +64,7 @@ function SCHEDULEDISPATCHER:AddSchedule( Scheduler, ScheduleFunction, ScheduleAr
-- Initialize the ObjectSchedulers array, which is a weakly coupled table.
-- If the object used as the key is nil, then the garbage collector will remove the item from the Functions array.
self.ObjectSchedulers = self.ObjectSchedulers or setmetatable( {}, { __mode = "v" } )
self.ObjectSchedulers = self.ObjectSchedulers or {} -- setmetatable( {}, { __mode = "v" } )
if Scheduler.MasterObject then
self.ObjectSchedulers[self.CallID] = Scheduler