diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index 61e43a9e3..2256af070 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -171,4 +171,10 @@ function addContextMenu(entry, params) { entry.connect('button-press-event', Lang.bind(null, _onButtonPressEvent, entry)); entry.connect('popup-menu', Lang.bind(null, _onPopup, entry)); + + entry.connect('destroy', function() { + entry.menu.destroy(); + entry.menu = null; + entry._menuManager = null; + }); }