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

This would happen when using the --help or --version command line flags.
Merge pull request #953 from dorkster/fixes

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