]> git.draconx.ca Git - dxcommon.git/blobdiff - src/help.c
help_print_desc: Allow NULL option to disable localisation.
[dxcommon.git] / src / help.c
index d1dd5f5bc44055bf50a4599b0e1f24cf15ddc0bf..b09833a4a1cbd3e0a48e2a436cb087876128dcd7 100644 (file)
@@ -179,7 +179,10 @@ out:
 
 void help_print_desc(const struct option *opt, const char *s, int i, int w)
 {
-       for (s = pgettext_expr(opt->name, s); *s; w = 0) {
+       if (opt)
+               s = pgettext_expr(opt->name, s);
+
+       for (; *s; w = 0) {
                const char *nl = strchr(s, '\n');
                int n = (nl ? nl-s : -1);