about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/locale/dcngettext.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/locale/dcngettext.c b/src/locale/dcngettext.c
index d1e6c6d1..0b53286d 100644
--- a/src/locale/dcngettext.c
+++ b/src/locale/dcngettext.c
@@ -132,6 +132,9 @@ char *dcngettext(const char *domainname, const char *msgid1, const char *msgid2,
 	struct binding *q;
 	int old_errno = errno;
 
+	/* match gnu gettext behaviour */
+	if (!msgid1) goto notrans;
+
 	if ((unsigned)category >= LC_ALL) goto notrans;
 
 	if (!domainname) domainname = __gettextdomain();