fix #28746: Crash on changing instruments
Merge pull request #1090 from Igevorse/staff-text

fix #28746: Crash on changing instruments