Fixed a critical bug

The program would crash if you click File -> New and then you attempt to
Save. Now it gives you an error, but the program continues running.