diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index cc6c65397..538abd5b9 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -55,4 +55,10 @@ function addBackgroundMenu(actor) { openMenu(); }); actor.add_action(clickAction); + + actor.connect('destroy', function() { + actor._backgroundMenu.destroy(); + actor._backgroundMenu = null; + actor._backgroundManager = null; + }); }