summaryrefslogtreecommitdiffstats
path: root/runtime/throw_location.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/throw_location.cc')
-rw-r--r--runtime/throw_location.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/throw_location.cc b/runtime/throw_location.cc
index 6d1ca1b..e428511 100644
--- a/runtime/throw_location.cc
+++ b/runtime/throw_location.cc
@@ -25,8 +25,12 @@
namespace art {
std::string ThrowLocation::Dump() const {
- return StringPrintf("%s:%d", PrettyMethod(method_).c_str(),
- MethodHelper(method_).GetLineNumFromDexPC(dex_pc_));
+ if (method_ != NULL) {
+ return StringPrintf("%s:%d", PrettyMethod(method_).c_str(),
+ MethodHelper(method_).GetLineNumFromDexPC(dex_pc_));
+ } else {
+ return "unknown throw location";
+ }
}
void ThrowLocation::VisitRoots(RootVisitor* visitor, void* arg) {