Fixed a crash if you cancelled opening a file.