LCL-Gtk2: Ensure that correct DestroyHandle flavor is called for TShellListView. Fixes crashes when freeing TShellListView. Issue #41238, patch by Željan and Bart.

(cherry picked from commit dae82f367a)

Co-authored-by: Maxim Ganetsky <maxim@lazarus-ide.org>
This commit is contained in:
Maxim Ganetsky 2024-11-21 13:38:18 +00:00 committed by Maxim Ganetsky
parent 0692c43113
commit 9b59add482

View File

@ -1838,7 +1838,7 @@ begin
if Widgets^.MainView <> nil then
g_object_set_data(Pointer(Widgets^.MainView), 'widgetinfo', nil);
TWSWinControlClass(ClassParent).DestroyHandle(AWinControl);
TGtk2WSWinControl.DestroyHandle(AWinControl);
end;
class procedure TGtk2WSCustomListView.BeginUpdate(const ALV: TCustomListView);