summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/lang/natClass.cc4
2 files changed, 8 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 684b4aa88f5..4715590d9e7 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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.
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc
index 9f9f05ed8e5..ec4a18f1b51 100644
--- a/libjava/java/lang/natClass.cc
+++ b/libjava/java/lang/natClass.cc
@@ -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