aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/indicator-session.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/indicator-session.c b/src/indicator-session.c
index 8a4e298..13abb7d 100644
--- a/src/indicator-session.c
+++ b/src/indicator-session.c
@@ -138,6 +138,11 @@ child_realized (DbusmenuMenuitem * child, gpointer userdata)
return;
}
+ if (client == NULL) {
+ g_warning("Child realized for a menu we don't have? Section: %s", errorstr);
+ return;
+ }
+
position += posfunc();
g_debug("SUS: Adding child: %d", position);
GtkMenuItem * widget = dbusmenu_gtkclient_menuitem_get(client, child);
@@ -444,14 +449,16 @@ build_session_menu (gpointer userdata)
return TRUE;
}
- if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0, &returnval, &error)) {
- g_error("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" );
- g_error_free(error);
+ if (!org_freedesktop_DBus_start_service_by_name (proxy, INDICATOR_SESSION_DBUS_NAME, 0 /* Flags */, &returnval, &error)) {
+ g_critical("Unable to send message to DBus to start service: %s", error != NULL ? error->message : "(NULL error)" );
+ if (error != NULL) {
+ g_error_free(error);
+ }
return FALSE;
}
if (returnval != DBUS_START_REPLY_SUCCESS && returnval != DBUS_START_REPLY_ALREADY_RUNNING) {
- g_error("Return value isn't indicative of success: %d", returnval);
+ g_critical("Return value isn't indicative of success: %d", returnval);
return FALSE;
}