AuthPrompt: properly remove user widgets
When replacing a user widget, we need to destroy the child, not just unparent it, or it will leak. https://bugzilla.gnome.org/show_bug.cgi?id=738256
This commit is contained in:
parent
0bec76b6ee
commit
d8d046f2b3
@ -419,11 +419,13 @@ const AuthPrompt = new Lang.Class({
|
||||
},
|
||||
|
||||
setUser: function(user) {
|
||||
let oldChild = this._userWell.get_child();
|
||||
if (oldChild)
|
||||
oldChild.destroy();
|
||||
|
||||
if (user) {
|
||||
let userWidget = new UserWidget.UserWidget(user);
|
||||
this._userWell.set_child(userWidget.actor);
|
||||
} else {
|
||||
this._userWell.set_child(null);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user