Whenever I quit the game, it crashes on exit. This doesn’t happen if I start and immediately exit (not loading into a save), but does if I play a game then “exit to desktop.”

How can I stop the game crashing on exit?

quit.jpg
error dump.jpg