Skip to content

avoid crash when window is null in become_first_responder #204

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

httnn
Copy link
Contributor

@httnn httnn commented Apr 6, 2025

apparently newer Rust versions (starting with 1.86?) have stricter debug assertions regarding unsafe code which caused a crash under debug builds because window was null in the become_first_responder method.

this fix simply checks whether window is null or not.

@micahrj
Copy link
Member

micahrj commented Apr 11, 2025

It looks like the build is failing due to warnings in the objc crate. Those warnings have been addressed on the master branch but not on the latest version on crates.io: SSheldon/rust-objc#125

Long-term I think the best thing to do would be to switch to the objc2 crate, but my recommendation for now is to add the following to the top of lib.rs:

#![allow(unexpected_cfgs)]

@micahrj micahrj merged commit 3e12973 into RustAudio:master Apr 14, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants