[Lldb-commits] [lldb] r166439 - /lldb/trunk/source/API/SBAddress.cpp
Greg Clayton
gclayton at apple.com
Mon Oct 22 13:49:35 PDT 2012
Author: gclayton
Date: Mon Oct 22 15:49:35 2012
New Revision: 166439
URL: http://llvm.org/viewvc/llvm-project?rev=166439&view=rev
Log:
<rdar://problem/12524810>
Fixed a crasher where if an invalid SBTarget was passed to:
lldb::addr_t
SBAddress::GetLoadAddress (const SBTarget &target) const;
We would crash.
Modified:
lldb/trunk/source/API/SBAddress.cpp
Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=166439&r1=166438&r2=166439&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Mon Oct 22 15:49:35 2012
@@ -119,10 +119,13 @@
lldb::addr_t addr = LLDB_INVALID_ADDRESS;
TargetSP target_sp (target.GetSP());
- if (m_opaque_ap.get())
+ if (target_sp)
{
- Mutex::Locker api_locker (target_sp->GetAPIMutex());
- addr = m_opaque_ap->GetLoadAddress (target_sp.get());
+ if (m_opaque_ap.get())
+ {
+ Mutex::Locker api_locker (target_sp->GetAPIMutex());
+ addr = m_opaque_ap->GetLoadAddress (target_sp.get());
+ }
}
if (log)
More information about the lldb-commits
mailing list