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}")); }