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

Check if MuseSampler module is added before creating MuseSounds menu items #25786

Conversation

cbjeukendrup
Copy link
Contributor

If the MuseSampler module is not added, then its actions are also not added, so trying to call makeMenuItem for a MuseSounds action returns nullptr. And nullptrs in menu items lists cause crashes later on.

Related to #25662.

Suggestions for a nicer fix are welcome...

@cbjeukendrup cbjeukendrup requested a review from Eism December 9, 2024 16:44
@RomanPudashkin RomanPudashkin removed the request for review from Eism December 23, 2024 08:22
…items

If the MuseSampler module is not added, then its actions are also not added, so trying to call `makeMenuItem` for a MuseSounds action returns nullptr. And nullptrs in menu items lists cause crashes later on.
@cbjeukendrup cbjeukendrup force-pushed the appmenumodel_musesampler_actions_crash branch from 3be6705 to 93c7c6d Compare December 23, 2024 15:01
@cbjeukendrup
Copy link
Contributor Author

(tested on macOS)

@cbjeukendrup cbjeukendrup merged commit 79790fe into musescore:master Dec 23, 2024
11 checks passed
@cbjeukendrup cbjeukendrup deleted the appmenumodel_musesampler_actions_crash branch December 23, 2024 23:24
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