PR 21409, segfault in _bfd_dwarf2_find_nearest_line
[deliverable/binutils-gdb.git] / bfd / dwarf2.c
index 132a67492a44788bb52fd0c8d82f3012d43f07d1..0ef3e1fc534252c41d6806c40c3b07902b5f3b5b 100644 (file)
@@ -4205,7 +4205,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
          looking up the function by section + offset uses the
          DW_AT_decl_line from the function DW_TAG_subprogram for the line,
          which will be the line of the function name.  */
-      if ((section->flags & SEC_CODE) == 0)
+      if (symbols != NULL && (section->flags & SEC_CODE) == 0)
        {
          asymbol **tmp;
 
This page took 0.03628 seconds and 4 git commands to generate.