Patch from Viktor Kutuzov: fixes a segmentation fault crash in lldb in the ProcessPOSIX class when the object gets destroyed. I can reproduce this problem on the FreeBSD platform and it should be reproducable for the other platforms also.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153769 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
index 68ffc2f..332dc41 100644
--- a/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
+++ b/source/Plugins/Process/POSIX/ProcessPOSIX.cpp
@@ -292,7 +292,7 @@
// limbo).
m_exit_now = true;
- if (kill(m_monitor->GetPID(), SIGKILL) && error.Success())
+ if ((m_monitor == NULL || kill(m_monitor->GetPID(), SIGKILL)) && error.Success())
{
error.SetErrorToErrno();
return error;