From 82eb9509e9e273e8e9e7e584553ccc49f476d4a3 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Mon, 20 Jan 2025 00:42:19 +1300 Subject: Filled holes in Fl_Text_Editor binding and make key/modifier/shortcut/flag representations more in line with C++ --- src/fltk-widgets-groups-text_displays.adb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/fltk-widgets-groups-text_displays.adb') diff --git a/src/fltk-widgets-groups-text_displays.adb b/src/fltk-widgets-groups-text_displays.adb index 0c90bec..011d841 100644 --- a/src/fltk-widgets-groups-text_displays.adb +++ b/src/fltk-widgets-groups-text_displays.adb @@ -478,8 +478,11 @@ package body FLTK.Widgets.Groups.Text_Displays is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_text_display (This.Void_Ptr); - free_fl_text_buffer (This.Raw_Buffer); This.Void_Ptr := Null_Pointer; + if This.Raw_Buffer /= Null_Pointer then + free_fl_text_buffer (This.Raw_Buffer); -- buffer is reference counted + This.Raw_Buffer := Null_Pointer; + end if; end if; end Finalize; -- cgit