diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-26 18:59:16 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-26 18:59:16 +0000 |
commit | 7aa52e1c7e34bc16c411a207beaad9a9dbfc8235 (patch) | |
tree | 70f30bff0a6ed7e7983e19bc9f809b463728ec9b /libjava | |
parent | 33a43d6eddd7fb15a1e987c668cb85175b6725f6 (diff) | |
download | gcc-7aa52e1c7e34bc16c411a207beaad9a9dbfc8235.tar.gz |
2010-01-26 Andrew Haley <aph@redhat.com>
* java/lang/natClass.cc (registerClosure): Make sure closures is
non NULL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156257 138bc75d-0d04-0410-961f-82ee72b054a4
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 |