summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBFunction.cpp')
-rw-r--r--lldb/source/API/SBFunction.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index f55b2147741..e3e56a53011 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -127,11 +127,12 @@ SBFunction::GetInstructions (SBTarget target)
{
Mutex::Locker api_locker;
ExecutionContext exe_ctx;
- if (target.IsValid())
+ TargetSP target_sp (target.GetSP());
+ if (target_sp)
{
- api_locker.Reset (target->GetAPIMutex().GetMutex());
- target->CalculateExecutionContext (exe_ctx);
- exe_ctx.SetProcessSP(target->GetProcessSP());
+ api_locker.Reset (target_sp->GetAPIMutex().GetMutex());
+ target_sp->CalculateExecutionContext (exe_ctx);
+ exe_ctx.SetProcessSP(target_sp->GetProcessSP());
}
ModuleSP module_sp = m_opaque_ptr->GetAddressRange().GetBaseAddress().GetModuleSP();
if (module_sp)
OpenPOWER on IntegriCloud