diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-07-31 12:19:47 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-07-31 12:19:47 +0100 |
commit | 2d749e76db573c6c5e178c348e0cc6a9776b485d (patch) | |
tree | 1fc35b14a266b25a2b956a71a86e19a442e86a8e | |
parent | c83ed43a5c86f541e7781066d51ddf754cab5f8a (diff) | |
download | fpGUI-2d749e76db573c6c5e178c348e0cc6a9776b485d.tar.xz |
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.
-rw-r--r-- | src/gui/fpg_editcombo.pas | 2 |
1 files changed, 1 insertions, 1 deletions
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; |