Fix null ptr dereference if jit debug not enabled.

Test: No crash when a jit debug object is not instantiated.
Change-Id: Ic4350a10258459ead7c5679ceb84372f1084f0ad
This commit is contained in:
Christopher Ferris 2018-01-22 17:37:59 -08:00
parent 0ba2c9f4a2
commit 2486d5a10d

View file

@ -50,7 +50,9 @@ bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map,
auto process_memory = stack_map->process_memory();
unwindstack::Unwinder unwinder(MAX_BACKTRACE_FRAMES + num_ignore_frames, stack_map->stack_maps(),
regs, stack_map->process_memory());
unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch());
if (stack_map->GetJitDebug() != nullptr) {
unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch());
}
unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore());
if (num_ignore_frames >= unwinder.NumFrames()) {