summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2010-07-22 15:21:51 +0200
committerTomas Bzatek <tbzatek@redhat.com>2010-07-22 15:21:51 +0200
commitfcf1ed7ce1eafa53bf9bf12476abd1c6fde5fc62 (patch)
treed2fc95152b1db379cd9695e8b1fdbe60548de456
parent6fdb16ee503199c431e875e96f42dd89cfb13c92 (diff)
downloadtuxcmd-fcf1ed7ce1eafa53bf9bf12476abd1c6fde5fc62.tar.xz
Fix panel popup menu item clearing
-rw-r--r--UMain.pas4
1 files changed, 3 insertions, 1 deletions
diff --git a/UMain.pas b/UMain.pas
index 065cc08..703f197 100644
--- a/UMain.pas
+++ b/UMain.pas
@@ -4165,11 +4165,13 @@ end;
procedure TFMain.FilePopupMenuPopup(Sender: TObject);
procedure ClearPopupMenu(Popup: TGTKMenuItem);
+ var x: TGTKMenuItem;
begin
while Popup.Count > 0 do begin
if Popup.Items[0].Count > 0 then ClearPopupMenu(Popup.Items[0]);
- Popup.Items[0].Free;
+ x := Popup.Items[0];
Popup.Delete(0);
+ x.Free;
end;
end;