Fix segfault when there's no render device when exiting the game

This would happen when using the --help or --version command line flags.