IDE: Prevent a crash when the SE is closed from a modal dialog.

git-svn-id: trunk@35811 -
This commit is contained in:
juha 2012-03-07 21:23:26 +00:00
parent f6c23f9fe9
commit 2e4c4d2bfe

View File

@ -2507,13 +2507,14 @@ begin
DebugBoss.UnLockCommandProcessing;
FInEditorChangedUpdating := False;
end;
PopupMenu := nil;
if (FAOwner<>nil) and (FEditor<>nil) then begin
UnbindEditor;
FEditor.Visible:=false;
FEditor.Parent:=nil;
TSourceNotebook(FAOwner).ReleaseEditor(self);
// free the synedit control after processing the events
EditorComponent.Owner.RemoveComponent(EditorComponent);
Application.ReleaseComponent(FEditor);
end;
FEditor:=nil;