[empathy] ll-xmpp-assistant: deal with the im-local-xmpp not being found



commit c786f765510f4796153f23b7c6cd549e1d6a2a6c
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Fri Sep 7 10:56:11 2012 +0200

    ll-xmpp-assistant: deal with the im-local-xmpp not being found
    
    For some reason my test user can't find it; best to not raise warnings in this
    case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683442

 .../empathy-local-xmpp-assistant-widget.c          |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
index aa4d6cf..c55e3ab 100644
--- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
+++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c
@@ -88,11 +88,14 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object)
   gtk_widget_show (w);
 
   pix = empathy_pixbuf_from_icon_name_sized ("im-local-xmpp", 48);
-  w = gtk_image_new_from_pixbuf (pix);
-  gtk_grid_attach (GTK_GRID (self), w, 1, 0, 1, 1);
-  gtk_widget_show (w);
+  if (pix != NULL)
+    {
+      w = gtk_image_new_from_pixbuf (pix);
+      gtk_grid_attach (GTK_GRID (self), w, 1, 0, 1, 1);
+      gtk_widget_show (w);
 
-  g_object_unref (pix);
+      g_object_unref (pix);
+    }
 
   self->priv->settings = empathy_account_settings_new ("salut", "local-xmpp",
       NULL, _("People nearby"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]