From 8cfb99e0c6f7eeae31cb676c8071e71eace2ff05 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 23 Aug 2009 18:23:39 +0000 Subject: [PATCH] Avoid a second round trip via EndEdit() and Destroy() after the editor was unfocused. Lead to an access violation in the second Destroy() call. Fixes issue #1304. --- source/grideditlinks.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/grideditlinks.pas b/source/grideditlinks.pas index 320c4297..3ebd978b 100644 --- a/source/grideditlinks.pas +++ b/source/grideditlinks.pas @@ -849,9 +849,8 @@ destructor TInplaceEditorLink.Destroy; begin if Assigned(FTextEditor) then FTextEditor.Release; - FEdit.Free; - FButton.Free; - FPanel.Free; + if not (csDestroying in FPanel.ComponentState) then + FPanel.Free; inherited; end;