IDE carbon: fixed 0010730: Carbon IDE crashes when quitting by freeing ControlSelection later

git-svn-id: trunk@13924 -
This commit is contained in:
tombo 2008-01-30 12:08:14 +00:00
parent 3a9f3361aa
commit d9d25883e8

View File

@ -1193,11 +1193,9 @@ begin
if DebugBoss<>nil then DebugBoss.EndDebugging;
// free control selection
if TheControlSelection<>nil then begin
TheControlSelection.OnChange:=nil;
TheControlSelection.OnSelectionFormChanged:=nil;
FreeThenNil(TheControlSelection);
end;
FreeAndNil(ComponentListForm);
@ -1242,6 +1240,10 @@ begin
FreeThenNil(EditorOpts);
FreeThenNil(EnvironmentOptions);
FreeThenNil(IDECommandScopes);
// free control selection
if TheControlSelection<>nil then
FreeThenNil(TheControlSelection);
DebugLn('[TMainIDE.Destroy] B -> inherited Destroy... ',ClassName);
{$IFDEF IDE_MEM_CHECK}CheckHeapWrtMemCnt('TMainIDE.Destroy B ');{$ENDIF}