]> git.0d.be Git - empathy.git/commitdiff
account-widget: presence_changed_cb: early return if widget has been destroyed
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 22 Dec 2009 17:59:57 +0000 (17:59 +0000)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 Dec 2009 18:06:47 +0000 (18:06 +0000)
The callback needs to manipulate widgets but can't do it if the account widget
has already been destroyed.

libempathy-gtk/empathy-account-widget.c

index 4747c8c9e52911285b8b627e5d20c31ac8ffabd0..9b82c3f2c146595a22ae0fedabd9b887717e923e 100644 (file)
@@ -1308,6 +1308,9 @@ presence_changed_cb (TpAccountManager *manager,
 {
   EmpathyAccountWidgetPriv *priv = GET_PRIV (self);
 
+  if (priv->destroyed)
+    return;
+
   if (state > TP_CONNECTION_PRESENCE_TYPE_OFFLINE)
     {
       /* We are online, display a Login button */