Added checked to ensure the index of FileList does not go below 0.
Fixes the exception when saving over an existing .flame. git-svn-id: https://svn.code.sf.net/p/apophysis7x/svn/trunk@3 a5d1c0f9-a0e9-45c6-87dd-9d276e40c949
This commit is contained in:
parent
22f0ee1201
commit
dbcc7b1762
@ -2025,9 +2025,11 @@ begin
|
|||||||
until (Pos('</flame>', FileList[FileList.count - 1]) <> 0)
|
until (Pos('</flame>', FileList[FileList.count - 1]) <> 0)
|
||||||
else
|
else
|
||||||
repeat
|
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
|
until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
|
||||||
(Pos('</flames>', FileList[FileList.count - 1]) <> 0);
|
(Pos('</flames>', FileList[FileList.count - 1]) <> 0) or
|
||||||
|
(FileList.Count = 0);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
FileList.Delete(FileList.Count - 1);
|
FileList.Delete(FileList.Count - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user