Extend the error message displayed when a plugin fails to load.
[deliverable/binutils-gdb.git] / bfd / bfdio.c
index 5ef3ec493ea5f11665a929d51c23424bd2e31b83..5f144bc7f3fee833ff97924ec8f2e3eec37364b9 100644 (file)
@@ -495,8 +495,9 @@ bfd_get_file_size (bfd *abfd)
       struct areltdata *adata = (struct areltdata *) abfd->arelt_data;
       archive_size = adata->parsed_size;
       /* If the archive is compressed we can't compare against file size.  */
-      if (memcmp (((struct ar_hdr *) adata->arch_header)->ar_fmag,
-                 "Z\012", 2) == 0)
+      if (adata->arch_header != NULL
+         && memcmp (((struct ar_hdr *) adata->arch_header)->ar_fmag,
+                    "Z\012", 2) == 0)
        return archive_size;
       abfd = abfd->my_archive;
     }
This page took 0.025005 seconds and 4 git commands to generate.