Fixed a crash on selecting empty files.