Gtk3: check if control has caret before destroying caret.

This commit is contained in:
zeljan1 2025-02-21 12:40:19 +01:00
parent 01d0c7d35c
commit c3c4a8132b

View File

@ -2721,7 +2721,7 @@ procedure TGtk3Widget.DestroyWidget;
var var
ATemp: PGtkWidget; ATemp: PGtkWidget;
begin begin
if IsValidHandle then if HasCaret and IsValidHandle then
GTK3WidgetSet.DestroyCaret(HWND(Self)); GTK3WidgetSet.DestroyCaret(HWND(Self));
if IsValidHandle and FOwnWidget then if IsValidHandle and FOwnWidget then