diff options
author | Jed Barber <jjbarber@y7mail.com> | 2017-05-10 20:07:16 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2017-05-10 20:07:16 +1000 |
commit | 703c2e726a75cbedb43d3105f9e0b2bab9e59e77 (patch) | |
tree | e62b5012c27d295e590bef9a7cac89bb08ee026d /src/fltk-widgets-buttons-light-round.adb | |
parent | 9dcf299b63268278b0a9a27ed2dc600f19e458b2 (diff) |
Fixed Finalize inheritance bug
Diffstat (limited to 'src/fltk-widgets-buttons-light-round.adb')
-rw-r--r-- | src/fltk-widgets-buttons-light-round.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fltk-widgets-buttons-light-round.adb b/src/fltk-widgets-buttons-light-round.adb index 769f556..6e66b2c 100644 --- a/src/fltk-widgets-buttons-light-round.adb +++ b/src/fltk-widgets-buttons-light-round.adb @@ -59,10 +59,11 @@ package body FLTK.Widgets.Buttons.Light.Round is procedure Finalize (This : in out Round_Button) is begin - if This in Round_Button and then - This.Void_Ptr /= System.Null_Address + if This.Void_Ptr /= System.Null_Address and then + This in Round_Button'Class then free_fl_round_button (This.Void_Ptr); + This.Void_Ptr := System.Null_Address; end if; Finalize (Light_Button (This)); end Finalize; |