interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer.
authorKyle Galloway <kgallowa@redhat.com>
Mon, 9 Apr 2007 20:32:19 +0000 (20:32 +0000)
committerKyle Galloway <kgallowa@gcc.gnu.org>
Mon, 9 Apr 2007 20:32:19 +0000 (20:32 +0000)
2007-04-09  Kyle Galloway  <kgallowa@redhat.com>

* interpret-run.cc: If debugging, check if args is NULL before
getting the "this" pointer.

From-SVN: r123681

libjava/ChangeLog
libjava/interpret-run.cc

index dc120cabc49d65335b4fb5ff4b884d38e5a5d283..5bcf24eb1cab8c97d5e99a8bff5164133e7c9204 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-09  Kyle Galloway  <kgallowa@redhat.com>
+
+       * interpret-run.cc: If debugging, check if args is NULL before
+       getting the "this" pointer.
+
 2007-04-09  Kyle Galloway  <kgallowa@redhat.com>
 
        * classpath/gnu/classpath/jdwp/value/ArrayValue.java: New file.
index 30e55daec3c06519f2c418d26a18bf7b2ff0af82..b8c88af78278c865f27cba843f6f6002d6365fb5 100644 (file)
@@ -46,9 +46,13 @@ details.  */
   // If the method is non-static, we need to set the type for the "this" pointer.
   if ((method->accflags & java::lang::reflect::Modifier::STATIC) == 0)
     {
-      // Set the "this" pointer for this frame
-      _Jv_word *this_ptr = reinterpret_cast<_Jv_word *> (args);
-      frame_desc.obj_ptr = this_ptr[0].o;
+      if (args)
+        {
+          // Set the "this" pointer for this frame.
+          _Jv_word *this_ptr = reinterpret_cast<_Jv_word *> (args);
+          frame_desc.obj_ptr = this_ptr[0].o;
+        }
+
       frame_desc.locals_type[0] = 'o';
       type_ctr++;
     }