Fix null argument handling during invoke from JDWP.
Fix a crash when passing null argument to a JDWP invoke.
Change-Id: I167f93f3a411f0de8458db3ba5bed3169d557ee9
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 52a2141..2b82167 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -2712,7 +2712,7 @@
if (argument == ObjectRegistry::kInvalidObject) {
return JDWP::ERR_INVALID_OBJECT;
}
- if (!argument->InstanceOf(parameter_type)) {
+ if (argument != NULL && !argument->InstanceOf(parameter_type)) {
return JDWP::ERR_ILLEGAL_ARGUMENT;
}