FIX: Crash when loading tabs (bug [3154521]).

This commit is contained in:
cobines 2011-01-13 05:58:48 +00:00
commit d3f2a462c9
2 changed files with 4 additions and 3 deletions

View file

@ -3412,7 +3412,8 @@ var
procedure ToggleWatcher(FileView: TFileView; var Watcher: TFileSystemWatcher; AnOwner: TComponent);
begin
if (WatchFilter <> []) and Assigned(FileView.FileSource) and
if (WatchFilter <> []) and
Assigned(FileView) and Assigned(FileView.FileSource) and
(FileView.FileSource.IsClass(TFileSystemFileSource)) then
begin
if not Assigned(Watcher) then

View file

@ -403,7 +403,7 @@ end;
procedure TFileView.SetCurrentPath(NewPath: String);
begin
if BeforeChangePath(FileSource, NewPath) then
if (NewPath <> CurrentPath) and BeforeChangePath(FileSource, NewPath) then
begin
FHistory.AddPath(NewPath); // Sets CurrentPath.
AfterChangePath;
@ -948,4 +948,4 @@ begin
end;
end.