FIX: Don't free file source manually.

This commit is contained in:
cobines 2009-11-14 20:25:12 +00:00
commit ee8a9b17c1

View file

@ -92,7 +92,6 @@ var
Operation: TFileSourceOperation;
OperationHandle: TOperationHandle;
ProgressDialog: TfrmFileOp;
bTargetFileSourceCreated: Boolean = False;
begin
try
with TfrmPackDlg.Create(nil) do
@ -131,7 +130,6 @@ begin
else
begin
// Create a new target file source.
bTargetFileSourceCreated := True;
// Only WCX now.
NewTargetFileSource := TWcxArchiveFileSource.CreateByArchiveName(edtPackCmd.Text);
@ -177,8 +175,6 @@ begin
finally
if Assigned(Files) then
FreeAndNil(Files);
if bTargetFileSourceCreated and Assigned(NewTargetFileSource) then
FreeAndNil(NewTargetFileSource);
end;
end;