SynEdit: Fix crash in designer, when closing form or deleting a Highlighter that was assigned to SynEdit. (Notification would not remove all references to the highlighter)

git-svn-id: trunk@19009 -
This commit is contained in:
martin 2009-03-16 21:43:01 +00:00
parent 51d4db2ebc
commit a487572de8

View File

@ -5376,6 +5376,8 @@ begin
if Operation = opRemove then begin
if AComponent = fHighlighter then begin
fHighlighter := nil;
fMarkupHighCaret.Highlighter := nil;
fMarkupWordGroup.Highlighter := nil;
{begin} //mh 2000-10-01
if not (csDestroying in ComponentState) then begin
RecalcCharExtent;
@ -5409,6 +5411,7 @@ begin
Value.FreeNotification(Self);
end;
fHighlighter := Value;
// Ensure to free all copies in SynEit.Notification too
fMarkupHighCaret.Highlighter := Value;
fMarkupWordGroup.Highlighter := Value;
{$IFDEF SYN_LAZARUS}