Avoid crash if trying to open a non-existent file

which currently might occur by clicking in the history entry of a file which was removed