From a1bf353780254b8cb03ea0f820917d104ce9ca66 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 22 Feb 2020 11:51:03 -0400 Subject: Kernel: Correct pending feedback. --- src/core/hle/kernel/scheduler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index e5892727e..f2664ce65 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -530,10 +530,11 @@ SchedulerLockAndSleep::SchedulerLockAndSleep(KernelCore& kernel, Handle& event_h } SchedulerLockAndSleep::~SchedulerLockAndSleep() { - if (!sleep_cancelled) { - auto& time_manager = kernel.TimeManager(); - time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds); + if (sleep_cancelled) { + return; } + auto& time_manager = kernel.TimeManager(); + time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds); } } // namespace Kernel -- cgit v1.2.3