Notification: don't expand the content on a destroyed notification

If the notification is destroyed between an allocate and the redraw,
the meta_later is invoked on a destroyed object, and fails because
the clutter calls are invalid at that point.

https://bugzilla.gnome.org/show_bug.cgi?id=722547
This commit is contained in:
Giovanni Campagna 2014-01-15 18:05:45 +01:00
parent e78c59a4a8
commit d981515b08

View File

@ -1026,6 +1026,9 @@ const Notification = new Lang.Class({
Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
Lang.bind(this, Lang.bind(this,
function() { function() {
if (this._destroyed)
return false;
if (this._canExpandContent()) { if (this._canExpandContent()) {
this._addBannerBody(); this._addBannerBody();
this._table.add_style_class_name('multi-line-notification'); this._table.add_style_class_name('multi-line-notification');