fix #40146: Crash on changing rest duration