From b2f485d9dfe25c2006fe2a1ace9a7ed1a9a9162f Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Sun, 24 Nov 2024 13:55:54 +1300 Subject: Fixed double free in Finalize subprograms --- src/fltk-devices-surfaces-copy.adb | 1 + src/fltk-devices-surfaces-image.adb | 1 + src/fltk-devices-surfaces-paged-printers.adb | 1 + src/fltk-devices-surfaces-paged.adb | 1 + src/fltk-devices-surfaces.adb | 1 + src/fltk-environment.adb | 2 ++ src/fltk-help_dialogs.adb | 1 + src/fltk-images-bitmaps-xbm.adb | 1 + src/fltk-images-bitmaps.adb | 1 + src/fltk-images-pixmaps-gif.adb | 1 + src/fltk-images-pixmaps-xpm.adb | 1 + src/fltk-images-pixmaps.adb | 1 + src/fltk-images-rgb-bmp.adb | 1 + src/fltk-images-rgb-jpeg.adb | 1 + src/fltk-images-rgb-png.adb | 1 + src/fltk-images-rgb-pnm.adb | 1 + src/fltk-images-rgb.adb | 1 + src/fltk-images-shared.adb | 1 + src/fltk-images-tiled.adb | 1 + src/fltk-images.adb | 1 + src/fltk-labels.adb | 1 + src/fltk-menu_items.adb | 1 + src/fltk-text_buffers.adb | 1 + src/fltk-widgets-boxes.adb | 1 + src/fltk-widgets-buttons-enter.adb | 1 + src/fltk-widgets-buttons-light-check.adb | 1 + src/fltk-widgets-buttons-light-radio.adb | 1 + src/fltk-widgets-buttons-light-round-radio.adb | 1 + src/fltk-widgets-buttons-light-round.adb | 1 + src/fltk-widgets-buttons-light.adb | 1 + src/fltk-widgets-buttons-radio.adb | 1 + src/fltk-widgets-buttons-repeat.adb | 1 + src/fltk-widgets-buttons-toggle.adb | 1 + src/fltk-widgets-buttons.adb | 1 + src/fltk-widgets-charts.adb | 1 + src/fltk-widgets-clocks-updated-round.adb | 1 + src/fltk-widgets-clocks-updated.adb | 1 + src/fltk-widgets-clocks.adb | 1 + src/fltk-widgets-groups-browsers.adb | 1 + src/fltk-widgets-groups-color_choosers.adb | 1 + src/fltk-widgets-groups-help_views.adb | 1 + src/fltk-widgets-groups-input_choices.adb | 1 + src/fltk-widgets-groups-packed.adb | 1 + src/fltk-widgets-groups-scrolls.adb | 1 + src/fltk-widgets-groups-spinners.adb | 1 + src/fltk-widgets-groups-tabbed.adb | 1 + src/fltk-widgets-groups-text_displays-text_editors.adb | 1 + src/fltk-widgets-groups-text_displays.adb | 1 + src/fltk-widgets-groups-tiled.adb | 1 + src/fltk-widgets-groups-windows-double-overlay.adb | 1 + src/fltk-widgets-groups-windows-double.adb | 1 + src/fltk-widgets-groups-windows-opengl.adb | 1 + src/fltk-widgets-groups-windows-single-menu.adb | 1 + src/fltk-widgets-groups-windows-single.adb | 1 + src/fltk-widgets-groups-windows.adb | 1 + src/fltk-widgets-groups-wizards.adb | 1 + src/fltk-widgets-groups.adb | 1 + src/fltk-widgets-inputs-file.adb | 1 + src/fltk-widgets-inputs-float.adb | 1 + src/fltk-widgets-inputs-integer.adb | 1 + src/fltk-widgets-inputs-multiline.adb | 1 + src/fltk-widgets-inputs-outputs-multiline.adb | 1 + src/fltk-widgets-inputs-outputs.adb | 1 + src/fltk-widgets-inputs-secret.adb | 1 + src/fltk-widgets-inputs.adb | 1 + src/fltk-widgets-menus-choices.adb | 1 + src/fltk-widgets-menus-menu_bars.adb | 1 + src/fltk-widgets-menus-menu_buttons.adb | 1 + src/fltk-widgets-menus.adb | 1 + src/fltk-widgets-progress_bars.adb | 1 + src/fltk-widgets-valuators-adjusters.adb | 1 + src/fltk-widgets-valuators-counters-simple.adb | 1 + src/fltk-widgets-valuators-counters.adb | 1 + src/fltk-widgets-valuators-dials-fill.adb | 1 + src/fltk-widgets-valuators-dials-line.adb | 1 + src/fltk-widgets-valuators-dials.adb | 1 + src/fltk-widgets-valuators-rollers.adb | 1 + src/fltk-widgets-valuators-sliders-fill.adb | 1 + src/fltk-widgets-valuators-sliders-hor_fill.adb | 1 + src/fltk-widgets-valuators-sliders-hor_nice.adb | 1 + src/fltk-widgets-valuators-sliders-horizontal.adb | 1 + src/fltk-widgets-valuators-sliders-nice.adb | 1 + src/fltk-widgets-valuators-sliders-scrollbars.adb | 1 + src/fltk-widgets-valuators-sliders-value-horizontal.adb | 1 + src/fltk-widgets-valuators-sliders-value.adb | 1 + src/fltk-widgets-valuators-sliders.adb | 1 + src/fltk-widgets-valuators-value_inputs.adb | 1 + src/fltk-widgets-valuators-value_outputs.adb | 1 + src/fltk-widgets-valuators.adb | 1 + src/fltk-widgets.adb | 1 + 90 files changed, 91 insertions(+) diff --git a/src/fltk-devices-surfaces-copy.adb b/src/fltk-devices-surfaces-copy.adb index a904c42..8c90ffb 100644 --- a/src/fltk-devices-surfaces-copy.adb +++ b/src/fltk-devices-surfaces-copy.adb @@ -70,6 +70,7 @@ package body FLTK.Devices.Surfaces.Copy is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_copy_surface (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-devices-surfaces-image.adb b/src/fltk-devices-surfaces-image.adb index 4eadc9a..56566ea 100644 --- a/src/fltk-devices-surfaces-image.adb +++ b/src/fltk-devices-surfaces-image.adb @@ -70,6 +70,7 @@ package body FLTK.Devices.Surfaces.Image is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_image_surface (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-devices-surfaces-paged-printers.adb b/src/fltk-devices-surfaces-paged-printers.adb index 944efa6..601f425 100644 --- a/src/fltk-devices-surfaces-paged-printers.adb +++ b/src/fltk-devices-surfaces-paged-printers.adb @@ -142,6 +142,7 @@ package body FLTK.Devices.Surfaces.Paged.Printers is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_printer (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-devices-surfaces-paged.adb b/src/fltk-devices-surfaces-paged.adb index 990d1ea..5de3fec 100644 --- a/src/fltk-devices-surfaces-paged.adb +++ b/src/fltk-devices-surfaces-paged.adb @@ -140,6 +140,7 @@ package body FLTK.Devices.Surfaces.Paged is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_paged_device (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-devices-surfaces.adb b/src/fltk-devices-surfaces.adb index cee6910..58a5fa0 100644 --- a/src/fltk-devices-surfaces.adb +++ b/src/fltk-devices-surfaces.adb @@ -39,6 +39,7 @@ package body FLTK.Devices.Surfaces is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_surface (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-environment.adb b/src/fltk-environment.adb index 4cafb19..1632717 100644 --- a/src/fltk-environment.adb +++ b/src/fltk-environment.adb @@ -400,6 +400,7 @@ package body FLTK.Environment is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_pref_database (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; @@ -409,6 +410,7 @@ package body FLTK.Environment is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_pref_group (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; if This.Root_Ptr /= Null_Pointer then free_fl_pref_database (This.Root_Ptr); end if; diff --git a/src/fltk-help_dialogs.adb b/src/fltk-help_dialogs.adb index fa84f01..323fcab 100644 --- a/src/fltk-help_dialogs.adb +++ b/src/fltk-help_dialogs.adb @@ -151,6 +151,7 @@ package body FLTK.Help_Dialogs is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_help_dialog (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-bitmaps-xbm.adb b/src/fltk-images-bitmaps-xbm.adb index 1d063c4..eb8c093 100644 --- a/src/fltk-images-bitmaps-xbm.adb +++ b/src/fltk-images-bitmaps-xbm.adb @@ -31,6 +31,7 @@ package body FLTK.Images.Bitmaps.XBM is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_xbm_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-bitmaps.adb b/src/fltk-images-bitmaps.adb index 68c7253..90150c9 100644 --- a/src/fltk-images-bitmaps.adb +++ b/src/fltk-images-bitmaps.adb @@ -68,6 +68,7 @@ package body FLTK.Images.Bitmaps is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_bitmap (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-pixmaps-gif.adb b/src/fltk-images-pixmaps-gif.adb index f882749..535debf 100644 --- a/src/fltk-images-pixmaps-gif.adb +++ b/src/fltk-images-pixmaps-gif.adb @@ -31,6 +31,7 @@ package body FLTK.Images.Pixmaps.GIF is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_gif_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-pixmaps-xpm.adb b/src/fltk-images-pixmaps-xpm.adb index 3b170ec..006c8b4 100644 --- a/src/fltk-images-pixmaps-xpm.adb +++ b/src/fltk-images-pixmaps-xpm.adb @@ -31,6 +31,7 @@ package body FLTK.Images.Pixmaps.XPM is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_xpm_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-pixmaps.adb b/src/fltk-images-pixmaps.adb index d76132f..2e66d2f 100644 --- a/src/fltk-images-pixmaps.adb +++ b/src/fltk-images-pixmaps.adb @@ -76,6 +76,7 @@ package body FLTK.Images.Pixmaps is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_pixmap (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-rgb-bmp.adb b/src/fltk-images-rgb-bmp.adb index 73d3293..01669eb 100644 --- a/src/fltk-images-rgb-bmp.adb +++ b/src/fltk-images-rgb-bmp.adb @@ -31,6 +31,7 @@ package body FLTK.Images.RGB.BMP is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_bmp_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-rgb-jpeg.adb b/src/fltk-images-rgb-jpeg.adb index f5f5419..17debb5 100644 --- a/src/fltk-images-rgb-jpeg.adb +++ b/src/fltk-images-rgb-jpeg.adb @@ -38,6 +38,7 @@ package body FLTK.Images.RGB.JPEG is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_jpeg_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-rgb-png.adb b/src/fltk-images-rgb-png.adb index a60a3e0..67befe3 100644 --- a/src/fltk-images-rgb-png.adb +++ b/src/fltk-images-rgb-png.adb @@ -39,6 +39,7 @@ package body FLTK.Images.RGB.PNG is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_png_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-rgb-pnm.adb b/src/fltk-images-rgb-pnm.adb index 8227cd9..362b8d6 100644 --- a/src/fltk-images-rgb-pnm.adb +++ b/src/fltk-images-rgb-pnm.adb @@ -31,6 +31,7 @@ package body FLTK.Images.RGB.PNM is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_pnm_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-rgb.adb b/src/fltk-images-rgb.adb index 8ea3646..19a7952 100644 --- a/src/fltk-images-rgb.adb +++ b/src/fltk-images-rgb.adb @@ -100,6 +100,7 @@ package body FLTK.Images.RGB is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_rgb_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-shared.adb b/src/fltk-images-shared.adb index fd2663b..d475cc3 100644 --- a/src/fltk-images-shared.adb +++ b/src/fltk-images-shared.adb @@ -140,6 +140,7 @@ package body FLTK.Images.Shared is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then fl_shared_image_release (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images-tiled.adb b/src/fltk-images-tiled.adb index a489f82..6bed730 100644 --- a/src/fltk-images-tiled.adb +++ b/src/fltk-images-tiled.adb @@ -85,6 +85,7 @@ package body FLTK.Images.Tiled is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_tiled_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-images.adb b/src/fltk-images.adb index e435976..19a1f86 100644 --- a/src/fltk-images.adb +++ b/src/fltk-images.adb @@ -166,6 +166,7 @@ package body FLTK.Images is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_image (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-labels.adb b/src/fltk-labels.adb index 4f5ff28..006db6b 100644 --- a/src/fltk-labels.adb +++ b/src/fltk-labels.adb @@ -139,6 +139,7 @@ package body FLTK.Labels is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_label (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; Interfaces.C.Strings.Free (This.My_Text); end if; end Finalize; diff --git a/src/fltk-menu_items.adb b/src/fltk-menu_items.adb index 73e4c3c..b93f1f5 100644 --- a/src/fltk-menu_items.adb +++ b/src/fltk-menu_items.adb @@ -230,6 +230,7 @@ package body FLTK.Menu_Items is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_menu_item (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-text_buffers.adb b/src/fltk-text_buffers.adb index e3755a1..5d88b10 100644 --- a/src/fltk-text_buffers.adb +++ b/src/fltk-text_buffers.adb @@ -517,6 +517,7 @@ package body FLTK.Text_Buffers is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_text_buffer (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-boxes.adb b/src/fltk-widgets-boxes.adb index 3194237..a506fd3 100644 --- a/src/fltk-widgets-boxes.adb +++ b/src/fltk-widgets-boxes.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Boxes is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_box (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-enter.adb b/src/fltk-widgets-buttons-enter.adb index cefe2b1..20ce598 100644 --- a/src/fltk-widgets-buttons-enter.adb +++ b/src/fltk-widgets-buttons-enter.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Enter is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_return_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-light-check.adb b/src/fltk-widgets-buttons-light-check.adb index 7594782..d6a7ef7 100644 --- a/src/fltk-widgets-buttons-light-check.adb +++ b/src/fltk-widgets-buttons-light-check.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Light.Check is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_check_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-light-radio.adb b/src/fltk-widgets-buttons-light-radio.adb index a1f0e95..c7ba63f 100644 --- a/src/fltk-widgets-buttons-light-radio.adb +++ b/src/fltk-widgets-buttons-light-radio.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Light.Radio is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_radio_light_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-light-round-radio.adb b/src/fltk-widgets-buttons-light-round-radio.adb index cabcb0d..1f1e3f8 100644 --- a/src/fltk-widgets-buttons-light-round-radio.adb +++ b/src/fltk-widgets-buttons-light-round-radio.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Light.Round.Radio is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_radio_round_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-light-round.adb b/src/fltk-widgets-buttons-light-round.adb index b0ed29a..9730413 100644 --- a/src/fltk-widgets-buttons-light-round.adb +++ b/src/fltk-widgets-buttons-light-round.adb @@ -67,6 +67,7 @@ package body FLTK.Widgets.Buttons.Light.Round is begin if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_round_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-light.adb b/src/fltk-widgets-buttons-light.adb index 13afeb6..6ab55bb 100644 --- a/src/fltk-widgets-buttons-light.adb +++ b/src/fltk-widgets-buttons-light.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Light is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_light_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-radio.adb b/src/fltk-widgets-buttons-radio.adb index 7fb764e..143beeb 100644 --- a/src/fltk-widgets-buttons-radio.adb +++ b/src/fltk-widgets-buttons-radio.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Radio is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_radio_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-repeat.adb b/src/fltk-widgets-buttons-repeat.adb index de4cf29..9446a22 100644 --- a/src/fltk-widgets-buttons-repeat.adb +++ b/src/fltk-widgets-buttons-repeat.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Repeat is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_repeat_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons-toggle.adb b/src/fltk-widgets-buttons-toggle.adb index 0fe7962..a1dcc60 100644 --- a/src/fltk-widgets-buttons-toggle.adb +++ b/src/fltk-widgets-buttons-toggle.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Buttons.Toggle is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_toggle_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-buttons.adb b/src/fltk-widgets-buttons.adb index a6c98d0..64f351a 100644 --- a/src/fltk-widgets-buttons.adb +++ b/src/fltk-widgets-buttons.adb @@ -115,6 +115,7 @@ package body FLTK.Widgets.Buttons is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-charts.adb b/src/fltk-widgets-charts.adb index fd477cc..e9a0f03 100644 --- a/src/fltk-widgets-charts.adb +++ b/src/fltk-widgets-charts.adb @@ -199,6 +199,7 @@ package body FLTK.Widgets.Charts is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_chart (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-clocks-updated-round.adb b/src/fltk-widgets-clocks-updated-round.adb index aa08655..f22b785 100644 --- a/src/fltk-widgets-clocks-updated-round.adb +++ b/src/fltk-widgets-clocks-updated-round.adb @@ -74,6 +74,7 @@ package body FLTK.Widgets.Clocks.Updated.Round is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_round_clock (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-clocks-updated.adb b/src/fltk-widgets-clocks-updated.adb index 9ca47ce..b0843b6 100644 --- a/src/fltk-widgets-clocks-updated.adb +++ b/src/fltk-widgets-clocks-updated.adb @@ -82,6 +82,7 @@ package body FLTK.Widgets.Clocks.Updated is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_clock (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-clocks.adb b/src/fltk-widgets-clocks.adb index 535dd36..a3cb315 100644 --- a/src/fltk-widgets-clocks.adb +++ b/src/fltk-widgets-clocks.adb @@ -116,6 +116,7 @@ package body FLTK.Widgets.Clocks is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_clock_output (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-browsers.adb b/src/fltk-widgets-groups-browsers.adb index cd9b3f3..9798c89 100644 --- a/src/fltk-widgets-groups-browsers.adb +++ b/src/fltk-widgets-groups-browsers.adb @@ -644,6 +644,7 @@ package body FLTK.Widgets.Groups.Browsers is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_abstract_browser (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-color_choosers.adb b/src/fltk-widgets-groups-color_choosers.adb index cd97fb3..9c02667 100644 --- a/src/fltk-widgets-groups-color_choosers.adb +++ b/src/fltk-widgets-groups-color_choosers.adb @@ -158,6 +158,7 @@ package body FLTK.Widgets.Groups.Color_Choosers is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_color_chooser (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-help_views.adb b/src/fltk-widgets-groups-help_views.adb index 24a592f..b5ed154 100644 --- a/src/fltk-widgets-groups-help_views.adb +++ b/src/fltk-widgets-groups-help_views.adb @@ -281,6 +281,7 @@ package body FLTK.Widgets.Groups.Help_Views is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_help_view (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-input_choices.adb b/src/fltk-widgets-groups-input_choices.adb index 7fc6870..6f36a31 100644 --- a/src/fltk-widgets-groups-input_choices.adb +++ b/src/fltk-widgets-groups-input_choices.adb @@ -182,6 +182,7 @@ package body FLTK.Widgets.Groups.Input_Choices is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_input_choice (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-packed.adb b/src/fltk-widgets-groups-packed.adb index 5bc4d37..ef9ab88 100644 --- a/src/fltk-widgets-groups-packed.adb +++ b/src/fltk-widgets-groups-packed.adb @@ -83,6 +83,7 @@ package body FLTK.Widgets.Groups.Packed is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_pack (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-scrolls.adb b/src/fltk-widgets-groups-scrolls.adb index a31dea3..9bc6a05 100644 --- a/src/fltk-widgets-groups-scrolls.adb +++ b/src/fltk-widgets-groups-scrolls.adb @@ -118,6 +118,7 @@ package body FLTK.Widgets.Groups.Scrolls is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_scroll (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-spinners.adb b/src/fltk-widgets-groups-spinners.adb index b87e27e..91ed74a 100644 --- a/src/fltk-widgets-groups-spinners.adb +++ b/src/fltk-widgets-groups-spinners.adb @@ -204,6 +204,7 @@ package body FLTK.Widgets.Groups.Spinners is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_spinner (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-tabbed.adb b/src/fltk-widgets-groups-tabbed.adb index b0b0c2f..cd7684a 100644 --- a/src/fltk-widgets-groups-tabbed.adb +++ b/src/fltk-widgets-groups-tabbed.adb @@ -110,6 +110,7 @@ package body FLTK.Widgets.Groups.Tabbed is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_tabs (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-text_displays-text_editors.adb b/src/fltk-widgets-groups-text_displays-text_editors.adb index 55399e7..2ff5afc 100644 --- a/src/fltk-widgets-groups-text_displays-text_editors.adb +++ b/src/fltk-widgets-groups-text_displays-text_editors.adb @@ -398,6 +398,7 @@ package body FLTK.Widgets.Groups.Text_Displays.Text_Editors is if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_text_editor (This.Void_Ptr); free_fl_text_buffer (This.Raw_Buffer); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-text_displays.adb b/src/fltk-widgets-groups-text_displays.adb index d8e296f..563fbbf 100644 --- a/src/fltk-widgets-groups-text_displays.adb +++ b/src/fltk-widgets-groups-text_displays.adb @@ -480,6 +480,7 @@ package body FLTK.Widgets.Groups.Text_Displays is 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; end if; end Finalize; diff --git a/src/fltk-widgets-groups-tiled.adb b/src/fltk-widgets-groups-tiled.adb index 9619a06..05dcd61 100644 --- a/src/fltk-widgets-groups-tiled.adb +++ b/src/fltk-widgets-groups-tiled.adb @@ -77,6 +77,7 @@ package body FLTK.Widgets.Groups.Tiled is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_tile (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows-double-overlay.adb b/src/fltk-widgets-groups-windows-double-overlay.adb index ca0936c..90f4754 100644 --- a/src/fltk-widgets-groups-windows-double-overlay.adb +++ b/src/fltk-widgets-groups-windows-double-overlay.adb @@ -133,6 +133,7 @@ package body FLTK.Widgets.Groups.Windows.Double.Overlay is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_overlay_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows-double.adb b/src/fltk-widgets-groups-windows-double.adb index 190b743..24ee93d 100644 --- a/src/fltk-widgets-groups-windows-double.adb +++ b/src/fltk-widgets-groups-windows-double.adb @@ -93,6 +93,7 @@ package body FLTK.Widgets.Groups.Windows.Double is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_double_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows-opengl.adb b/src/fltk-widgets-groups-windows-opengl.adb index e315cc4..fd43bc0 100644 --- a/src/fltk-widgets-groups-windows-opengl.adb +++ b/src/fltk-widgets-groups-windows-opengl.adb @@ -223,6 +223,7 @@ package body FLTK.Widgets.Groups.Windows.OpenGL is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_gl_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows-single-menu.adb b/src/fltk-widgets-groups-windows-single-menu.adb index 9aa0ded..fa2c9b3 100644 --- a/src/fltk-widgets-groups-windows-single-menu.adb +++ b/src/fltk-widgets-groups-windows-single-menu.adb @@ -116,6 +116,7 @@ package body FLTK.Widgets.Groups.Windows.Single.Menu is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_menu_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows-single.adb b/src/fltk-widgets-groups-windows-single.adb index a012920..1c90ba3 100644 --- a/src/fltk-widgets-groups-windows-single.adb +++ b/src/fltk-widgets-groups-windows-single.adb @@ -88,6 +88,7 @@ package body FLTK.Widgets.Groups.Windows.Single is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_single_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-windows.adb b/src/fltk-widgets-groups-windows.adb index af5cef7..0c02f6c 100644 --- a/src/fltk-widgets-groups-windows.adb +++ b/src/fltk-widgets-groups-windows.adb @@ -313,6 +313,7 @@ package body FLTK.Widgets.Groups.Windows is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_window (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups-wizards.adb b/src/fltk-widgets-groups-wizards.adb index b3d6d6d..df0d653 100644 --- a/src/fltk-widgets-groups-wizards.adb +++ b/src/fltk-widgets-groups-wizards.adb @@ -95,6 +95,7 @@ package body FLTK.Widgets.Groups.Wizards is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_wizard (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-groups.adb b/src/fltk-widgets-groups.adb index f61104a..17cb4fa 100644 --- a/src/fltk-widgets-groups.adb +++ b/src/fltk-widgets-groups.adb @@ -180,6 +180,7 @@ package body FLTK.Widgets.Groups is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_group (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-file.adb b/src/fltk-widgets-inputs-file.adb index f928187..b8aa4f3 100644 --- a/src/fltk-widgets-inputs-file.adb +++ b/src/fltk-widgets-inputs-file.adb @@ -115,6 +115,7 @@ package body FLTK.Widgets.Inputs.File is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_file_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-float.adb b/src/fltk-widgets-inputs-float.adb index be8e05a..248b9ad 100644 --- a/src/fltk-widgets-inputs-float.adb +++ b/src/fltk-widgets-inputs-float.adb @@ -72,6 +72,7 @@ package body FLTK.Widgets.Inputs.Float is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_float_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-integer.adb b/src/fltk-widgets-inputs-integer.adb index 6633354..401ca7c 100644 --- a/src/fltk-widgets-inputs-integer.adb +++ b/src/fltk-widgets-inputs-integer.adb @@ -72,6 +72,7 @@ package body FLTK.Widgets.Inputs.Integer is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_int_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-multiline.adb b/src/fltk-widgets-inputs-multiline.adb index b240631..3c33ef9 100644 --- a/src/fltk-widgets-inputs-multiline.adb +++ b/src/fltk-widgets-inputs-multiline.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Inputs.Multiline is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_multiline_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-outputs-multiline.adb b/src/fltk-widgets-inputs-outputs-multiline.adb index d0fb8f7..626a4ee 100644 --- a/src/fltk-widgets-inputs-outputs-multiline.adb +++ b/src/fltk-widgets-inputs-outputs-multiline.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Inputs.Outputs.Multiline is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_multiline_output (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-outputs.adb b/src/fltk-widgets-inputs-outputs.adb index e7d5f44..924e60b 100644 --- a/src/fltk-widgets-inputs-outputs.adb +++ b/src/fltk-widgets-inputs-outputs.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Inputs.Outputs is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_output (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs-secret.adb b/src/fltk-widgets-inputs-secret.adb index 0f56085..2cd59eb 100644 --- a/src/fltk-widgets-inputs-secret.adb +++ b/src/fltk-widgets-inputs-secret.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Inputs.Secret is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_secret_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-inputs.adb b/src/fltk-widgets-inputs.adb index 3281a00..254712a 100644 --- a/src/fltk-widgets-inputs.adb +++ b/src/fltk-widgets-inputs.adb @@ -321,6 +321,7 @@ package body FLTK.Widgets.Inputs is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-menus-choices.adb b/src/fltk-widgets-menus-choices.adb index 211114f..fc60efc 100644 --- a/src/fltk-widgets-menus-choices.adb +++ b/src/fltk-widgets-menus-choices.adb @@ -94,6 +94,7 @@ package body FLTK.Widgets.Menus.Choices is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_choice (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-menus-menu_bars.adb b/src/fltk-widgets-menus-menu_bars.adb index 3840f2e..f0c9569 100644 --- a/src/fltk-widgets-menus-menu_bars.adb +++ b/src/fltk-widgets-menus-menu_bars.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Menus.Menu_Bars is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_menu_bar (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-menus-menu_buttons.adb b/src/fltk-widgets-menus-menu_buttons.adb index 51c35f8..9a15d8b 100644 --- a/src/fltk-widgets-menus-menu_buttons.adb +++ b/src/fltk-widgets-menus-menu_buttons.adb @@ -89,6 +89,7 @@ package body FLTK.Widgets.Menus.Menu_Buttons is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_menu_button (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-menus.adb b/src/fltk-widgets-menus.adb index 5bd67df..4476332 100644 --- a/src/fltk-widgets-menus.adb +++ b/src/fltk-widgets-menus.adb @@ -295,6 +295,7 @@ package body FLTK.Widgets.Menus is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_menu (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-progress_bars.adb b/src/fltk-widgets-progress_bars.adb index 9b1301f..39b2b2d 100644 --- a/src/fltk-widgets-progress_bars.adb +++ b/src/fltk-widgets-progress_bars.adb @@ -107,6 +107,7 @@ package body FLTK.Widgets.Progress_Bars is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_progress (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-adjusters.adb b/src/fltk-widgets-valuators-adjusters.adb index 9d12b12..0c96332 100644 --- a/src/fltk-widgets-valuators-adjusters.adb +++ b/src/fltk-widgets-valuators-adjusters.adb @@ -87,6 +87,7 @@ package body FLTK.Widgets.Valuators.Adjusters is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_adjuster (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-counters-simple.adb b/src/fltk-widgets-valuators-counters-simple.adb index b7a35a2..d811722 100644 --- a/src/fltk-widgets-valuators-counters-simple.adb +++ b/src/fltk-widgets-valuators-counters-simple.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Counters.Simple is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_simple_counter (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-counters.adb b/src/fltk-widgets-valuators-counters.adb index a8cb10a..fd0619e 100644 --- a/src/fltk-widgets-valuators-counters.adb +++ b/src/fltk-widgets-valuators-counters.adb @@ -128,6 +128,7 @@ package body FLTK.Widgets.Valuators.Counters is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_counter (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-dials-fill.adb b/src/fltk-widgets-valuators-dials-fill.adb index b83d329..cb7d025 100644 --- a/src/fltk-widgets-valuators-dials-fill.adb +++ b/src/fltk-widgets-valuators-dials-fill.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Dials.Fill is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_fill_dial (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-dials-line.adb b/src/fltk-widgets-valuators-dials-line.adb index a02d1b8..7ee67ce 100644 --- a/src/fltk-widgets-valuators-dials-line.adb +++ b/src/fltk-widgets-valuators-dials-line.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Dials.Line is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_line_dial (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-dials.adb b/src/fltk-widgets-valuators-dials.adb index a796a8c..588b8ec 100644 --- a/src/fltk-widgets-valuators-dials.adb +++ b/src/fltk-widgets-valuators-dials.adb @@ -116,6 +116,7 @@ package body FLTK.Widgets.Valuators.Dials is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_dial (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-rollers.adb b/src/fltk-widgets-valuators-rollers.adb index 69e0f39..520a816 100644 --- a/src/fltk-widgets-valuators-rollers.adb +++ b/src/fltk-widgets-valuators-rollers.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Rollers is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_roller (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-fill.adb b/src/fltk-widgets-valuators-sliders-fill.adb index 6d88d56..3568838 100644 --- a/src/fltk-widgets-valuators-sliders-fill.adb +++ b/src/fltk-widgets-valuators-sliders-fill.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Fill is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_fill_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-hor_fill.adb b/src/fltk-widgets-valuators-sliders-hor_fill.adb index c35d10a..1b0e7ea 100644 --- a/src/fltk-widgets-valuators-sliders-hor_fill.adb +++ b/src/fltk-widgets-valuators-sliders-hor_fill.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Fill is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_hor_fill_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-hor_nice.adb b/src/fltk-widgets-valuators-sliders-hor_nice.adb index d280df4..f6a0751 100644 --- a/src/fltk-widgets-valuators-sliders-hor_nice.adb +++ b/src/fltk-widgets-valuators-sliders-hor_nice.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Hor_Nice is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_hor_nice_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-horizontal.adb b/src/fltk-widgets-valuators-sliders-horizontal.adb index 302b620..b4d7035 100644 --- a/src/fltk-widgets-valuators-sliders-horizontal.adb +++ b/src/fltk-widgets-valuators-sliders-horizontal.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Horizontal is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_horizontal_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-nice.adb b/src/fltk-widgets-valuators-sliders-nice.adb index 7fef1e8..73fc2c3 100644 --- a/src/fltk-widgets-valuators-sliders-nice.adb +++ b/src/fltk-widgets-valuators-sliders-nice.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Nice is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_nice_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-scrollbars.adb b/src/fltk-widgets-valuators-sliders-scrollbars.adb index e950e93..2afca08 100644 --- a/src/fltk-widgets-valuators-sliders-scrollbars.adb +++ b/src/fltk-widgets-valuators-sliders-scrollbars.adb @@ -101,6 +101,7 @@ package body FLTK.Widgets.Valuators.Sliders.Scrollbars is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_scrollbar (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-value-horizontal.adb b/src/fltk-widgets-valuators-sliders-value-horizontal.adb index 0b4d1e9..bac9b5d 100644 --- a/src/fltk-widgets-valuators-sliders-value-horizontal.adb +++ b/src/fltk-widgets-valuators-sliders-value-horizontal.adb @@ -68,6 +68,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value.Horizontal is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_hor_value_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders-value.adb b/src/fltk-widgets-valuators-sliders-value.adb index 878f498..40f935b 100644 --- a/src/fltk-widgets-valuators-sliders-value.adb +++ b/src/fltk-widgets-valuators-sliders-value.adb @@ -107,6 +107,7 @@ package body FLTK.Widgets.Valuators.Sliders.Value is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_value_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-sliders.adb b/src/fltk-widgets-valuators-sliders.adb index 793fffb..4c99cca 100644 --- a/src/fltk-widgets-valuators-sliders.adb +++ b/src/fltk-widgets-valuators-sliders.adb @@ -123,6 +123,7 @@ package body FLTK.Widgets.Valuators.Sliders is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_slider (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-value_inputs.adb b/src/fltk-widgets-valuators-value_inputs.adb index 8513680..62cd320 100644 --- a/src/fltk-widgets-valuators-value_inputs.adb +++ b/src/fltk-widgets-valuators-value_inputs.adb @@ -165,6 +165,7 @@ package body FLTK.Widgets.Valuators.Value_Inputs is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_value_input (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators-value_outputs.adb b/src/fltk-widgets-valuators-value_outputs.adb index e677850..dcd763d 100644 --- a/src/fltk-widgets-valuators-value_outputs.adb +++ b/src/fltk-widgets-valuators-value_outputs.adb @@ -126,6 +126,7 @@ package body FLTK.Widgets.Valuators.Value_Outputs is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_value_output (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets-valuators.adb b/src/fltk-widgets-valuators.adb index e2f87ee..79b576c 100644 --- a/src/fltk-widgets-valuators.adb +++ b/src/fltk-widgets-valuators.adb @@ -157,6 +157,7 @@ package body FLTK.Widgets.Valuators is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_valuator (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; diff --git a/src/fltk-widgets.adb b/src/fltk-widgets.adb index e9bf587..b4b8a67 100644 --- a/src/fltk-widgets.adb +++ b/src/fltk-widgets.adb @@ -514,6 +514,7 @@ package body FLTK.Widgets is Extra_Final (This); if This.Void_Ptr /= Null_Pointer and This.Needs_Dealloc then free_fl_widget (This.Void_Ptr); + This.Void_Ptr := Null_Pointer; end if; end Finalize; -- cgit