IDE: made destroy hint windows more robust vs errors

git-svn-id: trunk@15807 -
This commit is contained in:
mattias 2008-07-17 21:28:57 +00:00
parent 6fb1936620
commit 361831a886
2 changed files with 4 additions and 4 deletions

View File

@ -700,9 +700,10 @@ end;
destructor TCodeContextFrm.Destroy; destructor TCodeContextFrm.Destroy;
begin begin
inherited Destroy; Application.RemoveAllHandlersOfObject(Self);
if CodeContextFrm=Self then if CodeContextFrm=Self then
CodeContextFrm:=nil; CodeContextFrm:=nil;
inherited Destroy;
end; end;
end. end.

View File

@ -50,8 +50,6 @@ type
property Control: TWinControl read FControl write SetControl; property Control: TWinControl read FControl write SetControl;
end; end;
{ TCodeHintFrm }
{ TSrcEditHintWindow } { TSrcEditHintWindow }
TSrcEditHintWindow = class(THintWindow) TSrcEditHintWindow = class(THintWindow)
@ -315,9 +313,10 @@ end;
destructor TSrcEditHintWindow.Destroy; destructor TSrcEditHintWindow.Destroy;
begin begin
inherited Destroy; Application.RemoveAllHandlersOfObject(Self);
if SrcEditHintWindow=Self then if SrcEditHintWindow=Self then
SrcEditHintWindow:=nil; SrcEditHintWindow:=nil;
inherited Destroy;
end; end;
procedure TSrcEditHintWindow.UpdateHints; procedure TSrcEditHintWindow.UpdateHints;