Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Panic when no cams are connected #166

Closed
RivenSkaye opened this issue Mar 19, 2024 · 0 comments
Closed

[Windows] Panic when no cams are connected #166

RivenSkaye opened this issue Mar 19, 2024 · 0 comments

Comments

@RivenSkaye
Copy link

RivenSkaye commented Mar 19, 2024

Not sure if this applies to other OS options as well, but I didn't notice my USB cam was unplugged, and it gave me a nasty panic from nokhwa-bindings-windows/src/lib.rs, on line 278 due to the inner assertions in from_raw_parts.

The fix is rather easy; if count > 0 { <current L278-284 go here> } is all it takes to prevent the whole panic. And I don't think a single line fix warrants a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant