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:
LGUG2Z
2022-04-15 17:31:53 -07:00
parent fad4cbf019
commit 686d013734
+4
View File
@@ -130,9 +130,13 @@ 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> {
if self == HWND(0) {
Err(std::io::Error::last_os_error().into())
} else {
Ok(self.0) Ok(self.0)
} }
} }
}
)+ )+
} }
); );