mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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
1 changed files with 2 additions and 1 deletions
|
|
@ -214,7 +214,8 @@ const Button = new Lang.Class({
|
|||
destroy: function() {
|
||||
this.actor._delegate = null;
|
||||
|
||||
this.menu.destroy();
|
||||
if (this.menu)
|
||||
this.menu.destroy();
|
||||
this.actor.destroy();
|
||||
|
||||
this.emit('destroy');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue