mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 09:38:32 +02:00
fix(windows): reintroduce hwnd val checks
@riverar pointed out on Discord that I had my if and else clauses here mixed up. This commit reintroduces null value checks for HWNDs returned from Windows API calls.
This commit is contained in:
@@ -130,7 +130,11 @@ macro_rules! impl_process_windows_crate_integer_wrapper_result {
|
|||||||
$(
|
$(
|
||||||
impl ProcessWindowsCrateResult<$deref> for $input {
|
impl ProcessWindowsCrateResult<$deref> for $input {
|
||||||
fn process(self) -> Result<$deref> {
|
fn process(self) -> Result<$deref> {
|
||||||
Ok(self.0)
|
if self == HWND(0) {
|
||||||
|
Err(std::io::Error::last_os_error().into())
|
||||||
|
} else {
|
||||||
|
Ok(self.0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)+
|
)+
|
||||||
|
|||||||
Reference in New Issue
Block a user