From 703c2e726a75cbedb43d3105f9e0b2bab9e59e77 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Wed, 10 May 2017 20:07:16 +1000 Subject: Fixed Finalize inheritance bug --- src/fltk-widgets-inputs-float.adb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/fltk-widgets-inputs-float.adb') diff --git a/src/fltk-widgets-inputs-float.adb b/src/fltk-widgets-inputs-float.adb index 4769c8a..4e0b489 100644 --- a/src/fltk-widgets-inputs-float.adb +++ b/src/fltk-widgets-inputs-float.adb @@ -59,10 +59,11 @@ package body FLTK.Widgets.Inputs.Float is procedure Finalize (This : in out Float_Input) is begin - if This in Float_Input and then - This.Void_Ptr /= System.Null_Address + if This.Void_Ptr /= System.Null_Address and then + This in Float_Input'Class then free_fl_float_input (This.Void_Ptr); + This.Void_Ptr := System.Null_Address; end if; Finalize (Input (This)); end Finalize; -- cgit