panelMenu: Fix exception when destroying menuless button
There's explicit API to create PanelMenu.Buttons with no menu, so guard against this case in destroy(). https://bugzilla.gnome.org/show_bug.cgi?id=686763
This commit is contained in:
parent
b936e60876
commit
6f5e5672bb
@ -214,6 +214,7 @@ const Button = new Lang.Class({
|
||||
destroy: function() {
|
||||
this.actor._delegate = null;
|
||||
|
||||
if (this.menu)
|
||||
this.menu.destroy();
|
||||
this.actor.destroy();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user