mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 12:00:29 +02:00
FileBrowser: fix AV
This commit is contained in:
parent
aae7ed1f94
commit
c16997ba82
@ -295,7 +295,8 @@ constructor TFileBrowserController.Create(AOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
LazarusIDE.AddHandlerOnProjectOpened(@DoProjectChanged);
|
LazarusIDE.AddHandlerOnProjectOpened(@DoProjectChanged);
|
||||||
SourceEditorManagerIntf.RegisterChangeEvent(semEditorActivate,@ActiveEditorChanged);
|
if SourceEditorManagerIntf <> nil then
|
||||||
|
SourceEditorManagerIntf.RegisterChangeEvent(semEditorActivate,@ActiveEditorChanged);
|
||||||
FDirectoriesBeforeFiles:=DefaultDirectoriesBeforeFiles;
|
FDirectoriesBeforeFiles:=DefaultDirectoriesBeforeFiles;
|
||||||
FFilesInTree:=DefaultFilesInTree;
|
FFilesInTree:=DefaultFilesInTree;
|
||||||
ReadConfig;
|
ReadConfig;
|
||||||
@ -303,7 +304,8 @@ end;
|
|||||||
|
|
||||||
destructor TFileBrowserController.Destroy;
|
destructor TFileBrowserController.Destroy;
|
||||||
begin
|
begin
|
||||||
LazarusIDE.RemoveAllHandlersOfObject(Self);
|
if SourceEditorManagerIntf <> nil then
|
||||||
|
SourceEditorManagerIntf.UnRegisterChangeEvent(semEditorActivate,@ActiveEditorChanged);
|
||||||
if FNeedSave then
|
if FNeedSave then
|
||||||
WriteConfig;
|
WriteConfig;
|
||||||
inherited;
|
inherited;
|
||||||
|
Loading…
Reference in New Issue
Block a user