natClass.cc (finalize): Make sure that the class really has an engine.

2011-07-12  Andrew Haley  <aph@redhat.com>

	* java/lang/natClass.cc (finalize): Make sure that the class
	really has an engine.

From-SVN: r176199
This commit is contained in:
Andrew Haley 2011-07-12 12:50:36 +00:00 committed by Andrew Haley
parent ab079773d3
commit 2558c6054e
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-07-12 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (finalize): Make sure that the class
really has an engine.
2011-07-07 Matthias Klose <doko@ubuntu.com>
* libtool-version: Bump soversion.

View File

@ -668,7 +668,9 @@ java::lang::Class::newInstance (void)
void
java::lang::Class::finalize (void)
{
engine->unregister(this);
// Array classes don't have an engine, and don't need to be finalized.
if (engine)
engine->unregister(this);
}
#ifdef INTERPRETER