summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBSymbol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/API/SBSymbol.cpp')
-rw-r--r--lldb/source/API/SBSymbol.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index 51bb98c194a..697fff8e101 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -123,10 +123,11 @@ SBSymbol::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);
+ api_locker.Reset (target_sp->GetAPIMutex().GetMutex());
+ target_sp->CalculateExecutionContext (exe_ctx);
}
const AddressRange *symbol_range = m_opaque_ptr->GetAddressRangePtr();
if (symbol_range)
OpenPOWER on IntegriCloud