MainIde: fix dangling pointer in component-palette. Issue #0033895

git-svn-id: trunk@59878 -
This commit is contained in:
martin 2018-12-20 14:04:02 +00:00
parent 94284ccbe5
commit 9038532f9f

View File

@ -1690,8 +1690,10 @@ begin
FreeThenNil(IDEQuickFixes);
FreeThenNil(GlobalDesignHook);
FreeThenNil(LPKInfoCache);
if IDEComponentPalette<>nil then
if IDEComponentPalette<>nil then begin
TComponentPalette(IDEComponentPalette).PageControl:=nil;
IDEComponentPalette.Clear; // Clear references to TPkgComponent instances, which will be freed in "FreeThenNil(PkgBoss);"
end;
FreeThenNil(PkgBoss);
FreeThenNil(IDEComponentPalette);
FreeThenNil(IDECoolBar);