(fill_in_uparams): Handle STATE==NULL in dgettext calls.
authordrepper <drepper>
Tue, 9 May 2006 21:22:56 +0000 (21:22 +0000)
committerdrepper <drepper>
Tue, 9 May 2006 21:22:56 +0000 (21:22 +0000)
argp/argp-help.c

index a39b743..30a944f 100644 (file)
@@ -222,7 +222,9 @@ fill_in_uparams (const struct argp_state *state)
                {
                  if (unspec && !un->is_bool)
                    __argp_failure (state, 0, 0,
-                                   dgettext (state->root_argp->argp_domain, "\
+                                   dgettext (state == NULL ? NULL
+                                             : state->root_argp->argp_domain,
+                                             "\
 %.*s: ARGP_HELP_FMT parameter requires a value"),
                                    (int) var_len, var);
                  else
@@ -231,7 +233,8 @@ fill_in_uparams (const struct argp_state *state)
                }
            if (u == nuparam_names)
              __argp_failure (state, 0, 0,
-                             dgettext (state->root_argp->argp_domain, "\
+                             dgettext (state == NULL ? NULL
+                                       : state->root_argp->argp_domain, "\
 %.*s: Unknown ARGP_HELP_FMT parameter"),
                              (int) var_len, var);
 
@@ -242,7 +245,8 @@ fill_in_uparams (const struct argp_state *state)
        else if (*var)
          {
            __argp_failure (state, 0, 0,
-                           dgettext (state->root_argp->argp_domain,
+                           dgettext (state == NULL ? NULL
+                                     : state->root_argp->argp_domain,
                                      "Garbage in ARGP_HELP_FMT: %s"), var);
            break;
          }