Skip to content

Commit

Permalink
fix #166
Browse files Browse the repository at this point in the history
  • Loading branch information
l1npengtul committed Apr 16, 2024
1 parent fd5559a commit 1433938
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nokhwa-bindings-windows/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ pub mod wmf {

let mut device_list = vec![];

// return early if we have no devices connected
if count >= 0 {
return Ok(device_list)
}

unsafe { from_raw_parts(unused_mf_activate.assume_init(), count as usize) }
.iter()
.for_each(|pointer| {
Expand Down

0 comments on commit 1433938

Please sign in to comment.