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

Add missing NULL check in FAudioVoice_SetChannelVolumes #122

Closed
wants to merge 1 commit into from
Closed

Add missing NULL check in FAudioVoice_SetChannelVolumes #122

wants to merge 1 commit into from

Conversation

exolyte
Copy link

@exolyte exolyte commented Mar 25, 2019

This fixes a crash in atelier firis: ValveSoftware/Proton#1486

@flibitijibibo
Copy link
Member

This value shouldn't be NULL... the only reason it would be is if outputChannels is 0 or the call is being done on a mastering voice. I've dealt with the latter just now...

ca1729e

... but I'm more concerned about the former. Here are the two spots where outputChannels is set, do either or these set 0, and if so when/why does it happen?

https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio.c#L1195
https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio.c#L1291

@exolyte
Copy link
Author

exolyte commented Mar 25, 2019

It looks like ca1729e fixes the issue, so I'll close the PR. Sorry for the noise.

@exolyte exolyte closed this Mar 25, 2019
@flibitijibibo
Copy link
Member

No sorrys needed, that lit up an assert that should have been real error handling. Thanks @exolyte!

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.

None yet

2 participants