[gnome-panel] panel: Fix crash when running without gnome-session



commit 8cb5b77912d365f30ffd7027f6ba52212aebf4d1
Author: Vincent Untz <vuntz gnome org>
Date:   Tue May 24 00:07:44 2011 +0200

    panel: Fix crash when running without gnome-session
    
    https://bugzilla.gnome.org/show_bug.cgi?id=650476

 gnome-panel/libpanel-util/panel-session-manager.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-session-manager.c b/gnome-panel/libpanel-util/panel-session-manager.c
index 78fbaf2..32311cd 100644
--- a/gnome-panel/libpanel-util/panel-session-manager.c
+++ b/gnome-panel/libpanel-util/panel-session-manager.c
@@ -179,6 +179,12 @@ panel_session_manager_get_presence (PanelSessionManager *manager)
 
         variant = g_dbus_proxy_get_cached_property (manager->priv->presence_proxy,
                                                     "status");
+
+        if (!variant) {
+                g_warning ("Could not get presence from session manager.");
+                return PANEL_SESSION_MANAGER_PRESENCE_AVAILABLE;
+        }
+
         g_variant_get (variant, "u", &ret);
         g_variant_unref (variant);
 



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