From 2d749e76db573c6c5e178c348e0cc6a9776b485d Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 31 Jul 2012 12:19:47 +0100 Subject: Fixes a potential memory leak. I say potential, because FDropDown is free immediately after it is not needed any more, but if for some reason it wasn't, then we should free it in the destructor of the widget. --- src/gui/fpg_editcombo.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/fpg_editcombo.pas b/src/gui/fpg_editcombo.pas index 4dd011d0..626f02b1 100644 --- a/src/gui/fpg_editcombo.pas +++ b/src/gui/fpg_editcombo.pas @@ -900,7 +900,7 @@ end; destructor TfpgBaseEditCombo.Destroy; begin - if not Assigned(FDropDown) then + if Assigned(FDropDown) then FDropDown.Free; inherited Destroy; end; -- cgit v1.2.3-70-g09d2