diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/lang/natClass.cc | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9c32b0cb910..a76e94186b9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2001-09-30 Bryce McKinlay <bryce@waitaki.otago.ac.nz> + + * java/lang/natClass.cc (_Jv_IsAssignableFrom): Handle the case of + an uninitialized target class. + 2001-09-28 Per Bothner <per@bothner.com> * gnu/gcj/runtime/SharedLibLoader.java: New class. diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index d6fb3ab7d85..7b6b8b554a8 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -956,8 +956,9 @@ _Jv_IsAssignableFrom (jclass target, jclass source) return false; return true; } - else if (source->ancestors != NULL - && source->depth >= target->depth + else if (source->ancestors != NULL + && target->ancestors != NULL + && source->depth >= target->depth && source->ancestors[source->depth - target->depth] == target) return true; |