Segmentation Fault when exiting before every creating a game

While testing compilation on OS X, I noticed that every time I quit the game, it gave me a segmentation fault. This seems to be caused by the game trying to save the map before it's ever been generated.

The commit attached is probably not the best way to fix it, but it demonstrates the issue.