diff --git a/Terminal.Gui/Windows/FileDialog.cs b/Terminal.Gui/Windows/FileDialog.cs index ec2a03526..c2c004f38 100644 --- a/Terminal.Gui/Windows/FileDialog.cs +++ b/Terminal.Gui/Windows/FileDialog.cs @@ -349,6 +349,9 @@ namespace Terminal.Gui { internal bool ExecuteSelection (bool isPrompt = false) { + if (infos.Count == 0) { + return false; + } var isDir = infos [selected].Item2; if (isDir) {