Fix for crash on canceling the "Open file" dialog.