aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/charmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 073d458849..f76bc24709 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -159,7 +159,8 @@ charmap_read (const char *filename)
== 1)
|| fscanf (fp, "%% alias %as", &name) == 1)
{
- if (strcasecmp (name, filename) == 0)
+ if (filename != NULL
+ && strcasecmp (name, filename) == 0)
break;
free (name);