aboutsummaryrefslogtreecommitdiff
path: root/locale/programs/ld-ctype.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/ld-ctype.c')
-rw-r--r--locale/programs/ld-ctype.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 21f271f..23ca236 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1192,15 +1192,18 @@ get_character (struct token *now, struct charmap_t *charmap,
if (*seqp == NULL)
{
- /* Insert a negative entry. */
- static const struct charseq negative
- = { .ucs4 = ILLEGAL_CHAR_VALUE };
- uint32_t *newp = obstack_alloc (&repertoire->mem_pool,
- sizeof (uint32_t));
- *newp = now->val.ucs4;
-
- insert_entry (&repertoire->seq_table, newp, sizeof (uint32_t),
- (void *) &negative);
+ if (repertoire != NULL)
+ {
+ /* Insert a negative entry. */
+ static const struct charseq negative
+ = { .ucs4 = ILLEGAL_CHAR_VALUE };
+ uint32_t *newp = obstack_alloc (&repertoire->mem_pool,
+ sizeof (uint32_t));
+ *newp = now->val.ucs4;
+
+ insert_entry (&repertoire->seq_table, newp,
+ sizeof (uint32_t), (void *) &negative);
+ }
}
else
(*seqp)->ucs4 = now->val.ucs4;