fix #40016: Crash when closing score