* objfiles.c (gdb_bfd_ref): Handle abfd==NULL.
gdb/testsuite
	* gdb.java/jprint.java (jprint.props): New field.
	* gdb.java/jprint.exp (set_lang_java): Add regression test.
This commit is contained in:
Tom Tromey 2010-02-17 22:25:05 +00:00
parent ef801a0e1d
commit 6f451e5ec4
5 changed files with 23 additions and 2 deletions

View file

@ -1504,7 +1504,12 @@ objfiles_changed (void)
struct bfd *
gdb_bfd_ref (struct bfd *abfd)
{
int *p_refcount = bfd_usrdata (abfd);
int *p_refcount;
if (abfd == NULL)
return NULL;
p_refcount = bfd_usrdata (abfd);
if (p_refcount != NULL)
{