diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f804d9b2ad..06a2de9dc2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-09-04 Jie Zhang + + * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return + NULL if `ht' is NULL. + 2009-09-09 Martin Thuresson Update soruces to compile cleanly with -Wc++-compat: diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index f8e4c19e72..d4e3bbb942 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -1950,8 +1950,12 @@ bfinfdpic_relocs_info_find (struct htab *ht, const struct bfinfdpic_relocs_info *entry, enum insert_option insert) { - struct bfinfdpic_relocs_info **loc = - (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); + struct bfinfdpic_relocs_info **loc; + + if (!ht) + return NULL; + + loc = (struct bfinfdpic_relocs_info **) htab_find_slot (ht, entry, insert); if (! loc) return NULL;