MuseScore 3.6.2 crashes on undoing paste of selection that extends the score range
Steps to reproduce issue:
1) Create a new score, add some notes
2) Select some region comprising at least 2 measures
3) Copy it to clipboard
4) Paste it near the end, such that the score will be extended (new bars will be created) to fit the pasted region
5) Undo it (e.g. CTRL+Z).
Result: MuseScore crashes.