summaryrefslogtreecommitdiff
path: root/intl/loadmsgcat.c
diff options
context:
space:
mode:
Diffstat (limited to 'intl/loadmsgcat.c')
-rw-r--r--intl/loadmsgcat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index b05c630724..d98f365bf9 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -75,6 +75,13 @@ _nl_load_domain (domain)
domain->decided = 1;
domain->data = NULL;
+ /* If the record does not represent a valid locale the FILENAME
+ might be NULL. This can happen when according to the given
+ specification the locale file name is different for XPG and CEN
+ syntax. */
+ if (domain->filename == NULL)
+ return;
+
/* Try to open the addressed file. */
fd = open (domain->filename, O_RDONLY);
if (fd == -1)