fix #28746: Crash on changing instruments