aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-02-21 11:21:29 +0000
committerAlan Modra <amodra@gmail.com>2005-02-21 11:21:29 +0000
commitfedf8d51e03543c5411fd27ae855d614d4bf3333 (patch)
tree7e67b1805392b260b6ec872d5d9e4f9406383026 /bfd/coffgen.c
parent85e3476f965b07fb5c695d5e099a9b58a16b3609 (diff)
downloadgdb-fedf8d51e03543c5411fd27ae855d614d4bf3333.zip
gdb-fedf8d51e03543c5411fd27ae855d614d4bf3333.tar.gz
gdb-fedf8d51e03543c5411fd27ae855d614d4bf3333.tar.bz2
* coffgen.c (bfd_coff_get_comdat_section): Check that
coff_section_data isn't NULL.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 4e76b2f..426721a 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -2427,7 +2427,8 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
struct coff_comdat_info *
bfd_coff_get_comdat_section (bfd *abfd, struct bfd_section *sec)
{
- if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
+ if (bfd_get_flavour (abfd) == bfd_target_coff_flavour
+ && coff_section_data (abfd, sec) != NULL)
return coff_section_data (abfd, sec)->comdat;
else
return NULL;