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 #273159: Crash when pasting note with receiving tie on a new score #3719

Merged
merged 1 commit into from Jun 14, 2018

Conversation

dmitrio95
Copy link
Contributor

This is a fix to this issue which happens when trying to paste (or even load from a file) tied notes if a note has sufficiently large track number specified. In the example shown in the issue description something like this is pasted to the score:

<!-- Staff, Chord, etc. -->
<Note>
  <track>4</track>
  <endSpanner id="2"/>
  <!-- other properties -->
  </Note>
<!-- end of Chord, Staff, etc. -->

so the Note was considered to be at the 2nd staff which may eventually not exist in the destination score. Thus staff() calls for the note return a null pointer, and the absence of check for it leads to its dereferencing and a crash of the program. This patch adds the necessary nullpointer checks which prevents program crashes in such cases.

@anatoly-os anatoly-os merged commit 1561780 into musescore:master Jun 14, 2018
@dmitrio95 dmitrio95 deleted the bugfix/tie_paste_crash branch June 3, 2020 09:44
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.

None yet

2 participants