[CMAKE]
[reactos.git] / ntoskrnl / ke / wait.c
index a4737b0..3fc5106 100644 (file)
@@ -249,7 +249,7 @@ KiExitDispatcher(IN KIRQL OldIrql)
     Thread->WaitIrql = OldIrql;
 
     /* Swap threads and check if APCs were pending */
-    PendingApc = KiSwapContext(Thread, NextThread);
+    PendingApc = KiSwapContext(OldIrql, Thread);
     if (PendingApc)
     {
         /* Lower only to APC */