aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/session-service.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/session-service.c b/src/session-service.c
index 6c4dd1b..b88ee30 100644
--- a/src/session-service.c
+++ b/src/session-service.c
@@ -622,15 +622,19 @@ restart_dir_changed (void)
dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart Required..."));
}
dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_ICON_NAME, "emblem-important");
- session_dbus_set_name(session_dbus, ICON_RESTART);
- } else {
+ if (session_dbus != NULL) {
+ session_dbus_set_name(session_dbus, ICON_RESTART);
+ }
+ } else {
if (supress_confirmations()) {
dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart"));
} else {
dbusmenu_menuitem_property_set(restart_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Restart..."));
}
dbusmenu_menuitem_property_remove(restart_mi, DBUSMENU_MENUITEM_PROP_ICON_NAME);
- session_dbus_set_name(session_dbus, ICON_DEFAULT);
+ if (session_dbus != NULL) {
+ session_dbus_set_name(session_dbus, ICON_DEFAULT);
+ }
}
return;