summaryrefslogtreecommitdiff
path: root/src/fltk-widgets-groups-text_displays.adb
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2025-01-20 00:42:19 +1300
committerJedidiah Barber <contact@jedbarber.id.au>2025-01-20 00:42:19 +1300
commit82eb9509e9e273e8e9e7e584553ccc49f476d4a3 (patch)
treefcd903955511ba8798e76f76154c4d5b841ad6a5 /src/fltk-widgets-groups-text_displays.adb
parentf27eb859eff94ec9c13239daee15f60ffecde089 (diff)
Filled holes in Fl_Text_Editor binding and make key/modifier/shortcut/flag representations more in line with C++
Diffstat (limited to 'src/fltk-widgets-groups-text_displays.adb')
-rw-r--r--src/fltk-widgets-groups-text_displays.adb5
1 files changed, 4 insertions, 1 deletions
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;