Fix schedule statements used outside event handlers (addresses #974).

This commit is contained in:
Jon Siwek 2013-04-22 12:55:07 -05:00
parent 9a88dc500a
commit fa30d4a313
3 changed files with 13 additions and 4 deletions

View file

@ -4297,6 +4297,10 @@ Val* ScheduleExpr::Eval(Frame* f) const
if ( args )
{
TimerMgr* tmgr = mgr.CurrentTimerMgr();
if ( ! tmgr )
tmgr = timer_mgr;
tmgr->Add(new ScheduleTimer(event->Handler(), args, dt, tmgr));
}