From 33ab47986619a6f01a93c2cc37c1c6ab1b423453 Mon Sep 17 00:00:00 2001 From: blikblum Date: Sun, 7 Dec 2008 14:20:42 +0000 Subject: [PATCH] * Avoid sigsegv when destroying VTEditor git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@616 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../demos/vtbasic/VTEditors.pas | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/virtualtreeview-unstable/demos/vtbasic/VTEditors.pas b/components/virtualtreeview-unstable/demos/vtbasic/VTEditors.pas index 1da2b67e7..86516c5fe 100644 --- a/components/virtualtreeview-unstable/demos/vtbasic/VTEditors.pas +++ b/components/virtualtreeview-unstable/demos/vtbasic/VTEditors.pas @@ -10,7 +10,7 @@ interface uses LCLIntf,LCLType, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, - StdCtrls, VirtualTrees, ExtDlgs, ImgList, Buttons, ExtCtrls, ComCtrls, MaskEdit, LResources, EditBtn; + StdCtrls, VirtualTrees, ExtDlgs, Buttons, ExtCtrls, ComCtrls, MaskEdit, LResources, EditBtn; type // Describes the type of value a property tree node stores in its data property. @@ -36,7 +36,10 @@ interface PPropertyData = ^TPropertyData; // Our own edit link to implement several different node editors. - TPropertyEditLink = + + { TPropertyEditLink } + + TPropertyEditLink = class(TInterfacedObject, IVTEditLink) private FEdit: TWinControl; // One of the property editor classes. @@ -50,7 +53,7 @@ interface protected procedure EditWindowProc(var Message: TMessage); procedure EditKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); - + public constructor Create; destructor Destroy; override; @@ -163,6 +166,7 @@ implementation destructor TPropertyEditLink.Destroy; begin + FEdit.Parent := nil; FEdit.Free; FListItems.Free; inherited;