This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: Fix PR libgcj/179


2000-03-18  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/lang/natClass.cc (_Jv_IsAssignableFrom): If an interface
has
        no idt, it is not implemented by any loaded class, so return
false.


Index: natClass.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natClass.cc,v
retrieving revision 1.20
diff -u -r1.20 natClass.cc
--- natClass.cc	2000/03/09 09:22:36	1.20
+++ natClass.cc	2000/03/18 01:41:04
@@ -920,6 +920,8 @@
       _Jv_IDispatchTable *cl_idt = source->idt;
       _Jv_IDispatchTable *if_idt = target->idt;
       jshort cl_iindex = cl_idt->cls.iindex;
+      if (if_idt == NULL)
+        return false; // No class implementing TARGET has been loaded.
       if (cl_iindex <= if_idt->iface.ioffsets[0])
         {
 	  jshort offset = if_idt->iface.ioffsets[cl_iindex];

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]