summaryrefslogtreecommitdiff
path: root/glib/goption.c
diff options
context:
space:
mode:
Diffstat (limited to 'glib/goption.c')
-rw-r--r--glib/goption.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glib/goption.c b/glib/goption.c
index 8a1848dad..0464c2e0b 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -854,9 +854,9 @@ g_option_context_get_help (GOptionContext *context,
}
}
- g_string_append_printf (string, "%s\n %s", _("Usage:"), g_get_prgname());
+ g_string_append_printf (string, "%s\n %s", _("Usage:"), g_get_prgname ());
if (context->help_enabled ||
- context->main_group->n_entries > 0 ||
+ (context->main_group && context->main_group->n_entries > 0) ||
context->groups != NULL)
g_string_append_printf (string, " %s", _("[OPTION...]"));