summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_thread.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/k_thread.h')
-rw-r--r--src/core/hle/kernel/k_thread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h
index 1cde71e89..be1bc59ae 100644
--- a/src/core/hle/kernel/k_thread.h
+++ b/src/core/hle/kernel/k_thread.h
@@ -794,6 +794,10 @@ public:
class KScopedDisableDispatch {
public:
[[nodiscard]] explicit KScopedDisableDispatch(KernelCore& kernel_) : kernel{kernel_} {
+ // If we are shutting down the kernel, none of this is relevant anymore.
+ if (kernel.IsShuttingDown()) {
+ return;
+ }
GetCurrentThread(kernel).DisableDispatch();
}