From 9e122beedf54439bdecbfccdf9126fc2c02c29c9 Mon Sep 17 00:00:00 2001 From: Yaroslav Volovich Date: Fri, 13 Feb 2026 21:38:12 +0000 Subject: [PATCH] Fix Windows HANDLE check for windows-sys 0.52 --- codex-rs/utils/sleep-inhibitor/src/windows_inhibitor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codex-rs/utils/sleep-inhibitor/src/windows_inhibitor.rs b/codex-rs/utils/sleep-inhibitor/src/windows_inhibitor.rs index c83a432af2..880f586cc3 100644 --- a/codex-rs/utils/sleep-inhibitor/src/windows_inhibitor.rs +++ b/codex-rs/utils/sleep-inhibitor/src/windows_inhibitor.rs @@ -68,7 +68,7 @@ impl PowerRequest { }, }; let handle = unsafe { PowerCreateRequest(&context) }; - if handle.is_null() { + if handle == 0 { let error = std::io::Error::last_os_error(); return Err(format!("PowerCreateRequest failed: {error}")); }