aboutsummaryrefslogtreecommitdiff
path: root/libjava/interpret-run.cc
diff options
context:
space:
mode:
authorkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-09 20:32:19 +0000
committerkgallowa <kgallowa@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-09 20:32:19 +0000
commit3bbb4ded802b98bd51ad6837b638bbf02d56c4cf (patch)
tree19a655ae9bb391740c25b7709782bcdaa552c577 /libjava/interpret-run.cc
parentdcff630527292e8d64ccaedbd5b92bee57a19091 (diff)
2007-04-09 Kyle Galloway <kgallowa@redhat.com>
* interpret-run.cc: If debugging, check if args is NULL before getting the "this" pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123681 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret-run.cc')
-rw-r--r--libjava/interpret-run.cc10
1 files changed, 7 insertions, 3 deletions
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++;
}