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
dca925e40b
commit
123d6e1ef6
@ -214,7 +214,8 @@ const Button = new Lang.Class({
|
|||||||
destroy: function() {
|
destroy: function() {
|
||||||
this.actor._delegate = null;
|
this.actor._delegate = null;
|
||||||
|
|
||||||
this.menu.destroy();
|
if (this.menu)
|
||||||
|
this.menu.destroy();
|
||||||
this.actor.destroy();
|
this.actor.destroy();
|
||||||
|
|
||||||
this.emit('destroy');
|
this.emit('destroy');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user