-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 starting with piano open #3684
Conversation
mscore/pianotools.cpp
Outdated
key->setHighlighted(false); | ||
key->setSelected(false); | ||
} | ||
for (PianoKeyItem* key : keys) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same loop condition as above; merge it into a single loop? Or is there another reason (other than copy-pasted from changeSelection) to keep it separate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, it was, indeed, copy-pasted.
I initially tried something with setting selection
to NULL
but ran into C++ not being C, so I did that, at almost 5 o’clock in the night. I was mostly focussed on trying to get the crash fixed in the first place.
If using two separate methods is indeed the way to go, then, yes, this should definitely be merged into one.
2b697a2
to
592f1c3
Compare
Most probably needs to go to master too |
I cannot reproduce the crash on Windows :( Did you realize why |
Neither could I, but the code seems cleaner this way anyhow |
@Jojo-Schmitz I agree. |
fix crash when starting with piano open Manually merged from 2.3, see #3684
On Mon, 21 May 2018, Anatoly wrote:
I cannot reproduce the crash on Windows :( Did you realize why
`currentScore` is nullptr in this place on your architecture?
No, but it takes quite some effort to reproduce it:
You have to set it up so it starts with My_First_Score.mscz (or
just remove all config files to reset it to the default), then
enable the ‘P’iano, then exit MuseScore, then start it again.
(You also, obviously, need a 2.3, or 2.2.1 with the other piano
crash fix (which caused this bug) backported.)
|
fix crash when starting with piano open Manually merged from 2.3, see musescore#3684
fix crash when starting with piano open Manually merged from 2.3, see musescore#3684
cf. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=898757