diff options
Diffstat (limited to 'src/fltk-widgets-buttons-light-radio.adb')
-rw-r--r-- | src/fltk-widgets-buttons-light-radio.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fltk-widgets-buttons-light-radio.adb b/src/fltk-widgets-buttons-light-radio.adb index c04d628..11c2b35 100644 --- a/src/fltk-widgets-buttons-light-radio.adb +++ b/src/fltk-widgets-buttons-light-radio.adb @@ -59,10 +59,11 @@ package body FLTK.Widgets.Buttons.Light.Radio is procedure Finalize (This : in out Radio_Light_Button) is begin - if This in Radio_Light_Button and then - This.Void_Ptr /= System.Null_Address + if This.Void_Ptr /= System.Null_Address and then + This in Radio_Light_Button'Class then free_fl_radio_light_button (This.Void_Ptr); + This.Void_Ptr := System.Null_Address; end if; Finalize (Light_Button (This)); end Finalize; |