diff --git a/Forms/Main.pas b/Forms/Main.pas index fb1d08a..35c5248 100644 --- a/Forms/Main.pas +++ b/Forms/Main.pas @@ -2025,9 +2025,11 @@ begin until (Pos('', FileList[FileList.count - 1]) <> 0) else repeat - FileList.Delete(FileList.Count - 1); + if FileList.Count > 0 then + FileList.Delete(FileList.Count - 1); until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or - (Pos('', FileList[FileList.count - 1]) <> 0); + (Pos('', FileList[FileList.count - 1]) <> 0) or + (FileList.Count = 0); end else begin FileList.Delete(FileList.Count - 1);