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 when opening score where TAB clefs are not shown #22802

Merged
merged 1 commit into from
May 13, 2024

Conversation

cbjeukendrup
Copy link
Contributor

Resolves: #22759

@miiizen Is this what you intended?

(; within if is tricky: the thing at the left of the ; is not an expression but a statement, and thus not checked for truth.)

@cbjeukendrup cbjeukendrup requested a review from miiizen May 13, 2024 14:05
Copy link
Contributor

@miiizen miiizen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is what I should have written! thanks.

@cbjeukendrup
Copy link
Contributor Author

(Another correct way would have been:

if (Measure* prevMeas = searchMeasure->prevMeasure(); prevMeas && !clefSeg) {

But let's avoid these "if statements with initialisation" as much as possible, since not everyone might know exactly what they are and how they work and they don't make the code much nicer.)

@zacjansheski
Copy link
Contributor

Tested on MacOS 14, Windows 11, Ubuntu 22.04.3. Approved
#22759 FIXED

@cbjeukendrup cbjeukendrup merged commit 7c10c7e into musescore:master May 13, 2024
11 checks passed
@cbjeukendrup cbjeukendrup deleted the crash_no_tab_clef branch May 13, 2024 15:54
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.

Crash at opening if "Show clef" in Staff/Part Properties is unchecked
4 participants