aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/pe.em2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 1266fae..1df0609 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -800,7 +800,7 @@ gld_${EMULATION_NAME}_after_open ()
FIXME: This should be done via a function, rather than by
including an internal BFD header. */
- if (!coff_data (output_bfd)->pe)
+ if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == NULL)
einfo (_("%F%P: PE operations on non PE file.\n"));
pe_data (output_bfd)->pe_opthdr = pe;