natClass.cc (registerClosure): Make sure closures is non NULL.

2010-01-26  Andrew Haley  <aph@redhat.com>

	* java/lang/natClass.cc (registerClosure): Make sure closures is
	non NULL.

From-SVN: r156257
This commit is contained in:
Andrew Haley 2010-01-26 18:59:16 +00:00 committed by Andrew Haley
parent d9a6fdb74e
commit 31660932a6
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2010-01-26 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (registerClosure): Make sure closures is
non NULL.
2010-01-19 Matthias Klose <doko@ubuntu.com>
* Regenerate .class files.

View File

@ -689,9 +689,12 @@ void
_Jv_ClosureList::registerClosure (jclass klass, void *ptr)
{
_Jv_ClosureList **closures = klass->engine->get_closure_list (klass);
this->ptr = ptr;
this->next = *closures;
*closures = this;
if (closures)
{
this->ptr = ptr;
this->next = *closures;
*closures = this;
}
}
#endif