diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-12 12:50:36 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-12 12:50:36 +0000 |
commit | c6fc791ef7ea21de8705ce294a385eacf8dd885b (patch) | |
tree | 62f6bcba279bbf74e15db147c614ed7e9388fb6f /libjava | |
parent | 7f70d5bcb79832b83da4435efc38aec29623e548 (diff) | |
download | gcc-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')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 4 |
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 |