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

Fix crash with empty track #40

Merged
merged 1 commit into from
Sep 22, 2024
Merged

Fix crash with empty track #40

merged 1 commit into from
Sep 22, 2024

Conversation

ServiusHack
Copy link
Owner

When a track hasn't loaded a file the m_transportSource won't contain a source and thus crashes on some interactions (but not on others). Protect the calls by first checking whether an audio file was loaded.

Also call the playing state changed callback since the caller assumes the change actually changed so it needs to be "reset" for the UI to match the actual behavior.

When a track hasn't loaded a file the `m_transportSource` won't contain
a source and thus crashes on some interactions (but not on others).
Protect the calls by first checking whether an audio file was loaded.

Also call the *playing state changed* callback since the caller assumes
the change actually changed so it needs to be "reset" for the UI to
match the actual behavior.
@ServiusHack ServiusHack merged commit f3a401e into main Sep 22, 2024
4 checks passed
@ServiusHack ServiusHack deleted the fix_crash branch September 22, 2024 16:52
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.

1 participant