[Lldb-commits] [lldb] Fix a crasher when using the public API. (PR #80508)

via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 2 15:56:02 PST 2024


================
@@ -1089,9 +1089,9 @@ void SBDebugger::SetSelectedTarget(SBTarget &sb_target) {
   Log *log = GetLog(LLDBLog::API);
 
   TargetSP target_sp(sb_target.GetSP());
-  if (m_opaque_sp) {
+  if (m_opaque_sp && target_sp)
----------------
jimingham wrote:

Do we also want to check target_sp->IsValid() here?

https://github.com/llvm/llvm-project/pull/80508


More information about the lldb-commits mailing list