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 #116556: Crash by opening the Instruments dialog box after parts … #2739

Merged
merged 1 commit into from
Jul 12, 2016

Conversation

heuchi
Copy link
Contributor

@heuchi heuchi commented Jul 11, 2016

…deletion and undo

Ms::deleteExcerpt() did not make sure it really uses a staff of the master score to unlink staves of the excerpt. The loop using calls to Staff::primaryStaff() depends on the order of elements in _linkedStaves, since Staff::primaryStaff() will always return true if only two staves of two different scores are in the list.

With the given order of steps in #116556 this could cause the final call to

oscore->undo(new UnlinkStaff(staff, s));

having (staff == s) both pointing to the same staff in the excerpt. The pointer to _linkedStaves in the master score was therefore never set to 0, while the LinkedStaves object itself was deleted.

Opening the Instruments Dialog window made use of this invalid _linkedStaves pointer and crashed.

@lasconic lasconic merged commit 797d5f8 into musescore:master Jul 12, 2016
@heuchi heuchi deleted the 116556_findStaffInMasterScore branch July 12, 2016 20:37
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