Work in progress for:
rdar://problem/10577182
Audit lldb API impl for places where we need to perform a NULL check
Add a NULL check for SBTarget.AttachToProcessWithName() so it will not hang.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146948 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index 059f91c..967ea6b 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -379,7 +379,7 @@
)
{
SBProcess sb_process;
- if (m_opaque_sp)
+ if (name && m_opaque_sp)
{
Mutex::Locker api_locker (m_opaque_sp->GetAPIMutex());