diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 37b8ec4aec2..3a9b46263f6 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2010-01-26 Andrew Haley <aph@redhat.com> + + * java/lang/natClass.cc (registerClosure): Make sure closures is + non NULL. + 2010-01-19 Matthias Klose <doko@ubuntu.com> * Regenerate .class files. diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 5b141605f92..fb7da4a8625 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -689,9 +689,12 @@ void _Jv_ClosureList::registerClosure (jclass klass, void *ptr) { _Jv_ClosureList **closures = klass->engine->get_closure_list (klass); - this->ptr = ptr; - this->next = *closures; - *closures = this; + if (closures) + { + this->ptr = ptr; + this->next = *closures; + *closures = this; + } } #endif |