natReference.cc (add_to_hash): Set n->next before setting *link.

* java/lang/ref/natReference.cc (add_to_hash): Set n->next before
	setting *link.

From-SVN: r45996
This commit is contained in:
Tom Tromey 2001-10-03 16:47:02 +00:00 committed by Tom Tromey
parent 508fc6461f
commit b52a8930ff
2 changed files with 6 additions and 1 deletions

View file

@ -197,8 +197,8 @@ add_to_hash (java::lang::ref::Reference *the_reference)
link = &iter->next;
iter = *link;
}
*link = n;
n->next = (*link) ? (*link)->next : NULL;
*link = n;
}
// This is called when an object is ready to be finalized. This