diff --git a/VPet-Simulator.Windows.Interface/ScheduleTask.cs b/VPet-Simulator.Windows.Interface/ScheduleTask.cs index 8a78e1a..8866443 100644 --- a/VPet-Simulator.Windows.Interface/ScheduleTask.cs +++ b/VPet-Simulator.Windows.Interface/ScheduleTask.cs @@ -178,7 +178,7 @@ public class ScheduleTask } } - mw.Main.StartWork(wsi.Work.Double(wsi.DBL)); + mw.Dispatcher.Invoke(() => mw.Main.StartWork(wsi.Work.Double(wsi.DBL))); NowIndex++; } else if (ScheduleItems[NowIndex] is RestScheduleItem rsi)