From: Kyle Galloway Date: Mon, 9 Apr 2007 20:32:19 +0000 (+0000) Subject: interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1bdab7eb5e02ff0457c023da6a79b77c3d0ccb8;p=gcc.git interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer. 2007-04-09 Kyle Galloway * interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer. From-SVN: r123681 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index dc120cabc49..5bcf24eb1ca 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2007-04-09 Kyle Galloway + + * interpret-run.cc: If debugging, check if args is NULL before + getting the "this" pointer. + 2007-04-09 Kyle Galloway * classpath/gnu/classpath/jdwp/value/ArrayValue.java: New file. diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc index 30e55daec3c..b8c88af7827 100644 --- a/libjava/interpret-run.cc +++ b/libjava/interpret-run.cc @@ -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++; }