Packager: Prevent "List index out of bounds" error when restoring previously deleted item. Issue #24313, patch from Cyrax

git-svn-id: trunk@40883 -
This commit is contained in:
juha 2013-04-23 19:28:17 +00:00
parent 7dfc6db3f0
commit cbd3930dc4

View File

@ -2304,7 +2304,10 @@ end;
function TLazPackage.GetRemovedFiles(Index: integer): TPkgFile;
begin
Result:=TPkgFile(FRemovedFiles[Index]);
If (Index >= 0) And (Index < FRemovedFiles.Count) Then
Result:=TPkgFile(FRemovedFiles[Index])
Else
Result := NIL;
end;
function TLazPackage.GetFileCount: integer;