From 8bc9e1ffe7488aff10d2d9b645e6d5d5e8843d58 Mon Sep 17 00:00:00 2001 From: skalogryz Date: Tue, 19 May 2015 02:51:07 +0000 Subject: [PATCH] richmemo: gtk2 fix the destruction of the handle to use proper DestroyLCLComponent() method git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4142 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/richmemo/gtk2/gtk2richmemo.pas | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/richmemo/gtk2/gtk2richmemo.pas b/components/richmemo/gtk2/gtk2richmemo.pas index a6eebbfd7..f58448b27 100644 --- a/components/richmemo/gtk2/gtk2richmemo.pas +++ b/components/richmemo/gtk2/gtk2richmemo.pas @@ -694,7 +694,12 @@ begin , @Gtk2WS_MemoSelChanged, GetWidgetInfo(w)); g_signal_handler_disconnect (b, handlerid); - inherited DestroyHandle(AWinControl); + // the proper way of destroying a widgetset + Gtk2WidgetSet.DestroyLCLComponent(AWinControl); + // or actually - TGtk2WSWinControl.DestroyHandle(AWinControl) + // the following call + // TWSWinControlClass(Classparent).DestroyHandle(AWinControl); + // won't work, because TGtk2CustomMemo doesn't have DestoryHandle assigned end; class function TGtk2WSCustomRichMemo.GetSelLength(const ACustomEdit: TCustomEdit