FIX: Crash on shutdown when filelist loader active.

This commit is contained in:
cobines 2011-03-28 07:48:56 +00:00
commit a478793da1
2 changed files with 6 additions and 4 deletions

View file

@ -1651,7 +1651,7 @@ begin
begin begin
lblInfo.Caption := rsMsgLoadingFileList; lblInfo.Caption := rsMsgLoadingFileList;
end end
else else if Assigned(FileSource) then
begin begin
FilesInDir := 0; FilesInDir := 0;
FilesSelected := 0; FilesSelected := 0;
@ -1688,7 +1688,9 @@ begin
cnvFormatFileSize(SizeInDir), cnvFormatFileSize(SizeInDir),
FilesSelected, FilesSelected,
FilesInDir]); FilesInDir]);
end; end
else if not (csDestroying in ComponentState) then
lblInfo.Caption := '';
end; end;
procedure TColumnsFileView.MarkAll; procedure TColumnsFileView.MarkAll;

View file

@ -431,8 +431,6 @@ begin
for i := 0 to FileSourcesCount - 1 do for i := 0 to FileSourcesCount - 1 do
FHistory.FileSource[i].RemoveReloadEventListener(@ReloadEvent); FHistory.FileSource[i].RemoveReloadEventListener(@ReloadEvent);
RemoveAllFileSources;
if Assigned(FWorkersThread) then if Assigned(FWorkersThread) then
begin begin
StopWorkers; StopWorkers;
@ -461,6 +459,8 @@ begin
FreeAndNil(FFileViewWorkers); FreeAndNil(FFileViewWorkers);
end; end;
RemoveAllFileSources;
if Assigned(FFiles) then if Assigned(FFiles) then
FreeAndNil(FFiles); FreeAndNil(FFiles);
if Assigned(FFileSourceFiles) then if Assigned(FFileSourceFiles) then