diff options
Diffstat (limited to 'runtime/mirror')
-rw-r--r-- | runtime/mirror/class.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 9fa6073..29851a9 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -228,8 +228,12 @@ void Class::DumpClass(std::ostream& os, int flags) { os << " interfaces (" << num_direct_interfaces << "):\n"; for (size_t i = 0; i < num_direct_interfaces; ++i) { Class* interface = GetDirectInterface(self, h_this, i); - const ClassLoader* cl = interface->GetClassLoader(); - os << StringPrintf(" %2zd: %s (cl=%p)\n", i, PrettyClass(interface).c_str(), cl); + if (interface == nullptr) { + os << StringPrintf(" %2zd: nullptr!\n", i); + } else { + const ClassLoader* cl = interface->GetClassLoader(); + os << StringPrintf(" %2zd: %s (cl=%p)\n", i, PrettyClass(interface).c_str(), cl); + } } } if (!IsLoaded()) { |