summaryrefslogtreecommitdiff
path: root/libjava/java/lang
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 12:50:36 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 12:50:36 +0000
commitc6fc791ef7ea21de8705ce294a385eacf8dd885b (patch)
tree62f6bcba279bbf74e15db147c614ed7e9388fb6f /libjava/java/lang
parent7f70d5bcb79832b83da4435efc38aec29623e548 (diff)
downloadgcc-c6fc791ef7ea21de8705ce294a385eacf8dd885b.tar.gz
2011-07-12 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (finalize): Make sure that the class really has an engine. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang')
-rw-r--r--libjava/java/lang/natClass.cc4
1 files changed, 3 insertions, 1 deletions
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