From 9959a0a9c6094b9a6e4a2cdf433ddf6fbb252da2 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Wed, 22 May 2002 18:16:45 +0000 Subject: Avoid dereferencing null pointer in: * sh-dis.c (print_insn_sh): If coff and bfd_mach_sh, use arch_sh4 for disassembly. --- opcodes/sh-dis.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'opcodes/sh-dis.c') diff --git a/opcodes/sh-dis.c b/opcodes/sh-dis.c index 7f403806dd..24d4b41eaf 100644 --- a/opcodes/sh-dis.c +++ b/opcodes/sh-dis.c @@ -304,7 +304,8 @@ print_insn_sh (memaddr, info) /* SH coff object files lack information about the machine type, so we end up with bfd_mach_sh unless it was set explicitly (which could have happended if this is a call from gdb or the simulator.) */ - if (bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour) + if (info->symbols + && bfd_asymbol_flavour(*info->symbols) == bfd_target_coff_flavour) target_arch = arch_sh4; break; case bfd_mach_sh2: -- cgit v1.2.1