aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libindicator/indicator-ng.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libindicator/indicator-ng.c b/libindicator/indicator-ng.c
index 82af030..003ec70 100644
--- a/libindicator/indicator-ng.c
+++ b/libindicator/indicator-ng.c
@@ -244,9 +244,11 @@ indicator_ng_menu_changed (GMenuModel *menu,
gchar *action;
g_clear_pointer (&self->header_action, g_free);
- g_menu_model_get_item_attribute (self->menu, 0, G_MENU_ATTRIBUTE_ACTION, "s", &action);
- if (action && g_str_has_prefix (action, "indicator."))
- self->header_action = g_strdup (action + 10);
+ if (g_menu_model_get_item_attribute (self->menu, 0, G_MENU_ATTRIBUTE_ACTION, "s", &action) &&
+ g_str_has_prefix (action, "indicator."))
+ {
+ self->header_action = g_strdup (action + 10);
+ }
popup = g_menu_model_get_item_link (self->menu, 0, G_MENU_LINK_SUBMENU);
if (popup)