Applying key change to a selection causes crash if transposing instrument is involved
This bug causes a crash when a multi-measure key change is applied to a score with an instrument. Of the the half dozen instruments I've tried, they all reproduce this crash. NB, the only way I have found to not crash during a multimeasure key change, is to use 'treble clef' as the instrument. Once a 'treble clef' score is changed to an instrument, the crash happens.
Steps to reproduce:
1. Open a score with an instrument (eg flute, violin, etc. but not a 'treble clef' score)
2. Select a group of measures
3. Apply key change
Expected behavior: key change applied to selected measures.
Actual behavior: crash
OS: Ubuntu 20.04.1 LTS, Arch.: x86_64, MuseScore version (64-bit): 188.8.131.527916429, revision: 1977cb3