From: Andrew Haley Date: Tue, 12 Jul 2011 12:50:36 +0000 (+0000) Subject: natClass.cc (finalize): Make sure that the class really has an engine. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2558c6054e42adf217c513c6b8272c358cb89265;p=gcc.git natClass.cc (finalize): Make sure that the class really has an engine. 2011-07-12 Andrew Haley * java/lang/natClass.cc (finalize): Make sure that the class really has an engine. From-SVN: r176199 --- 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 + + * java/lang/natClass.cc (finalize): Make sure that the class + really has an engine. + 2011-07-07 Matthias Klose * 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