================
@@ -12,15 +12,19 @@
 
 namespace lldb_dap {
 
-SourceBreakpoint::SourceBreakpoint(const llvm::json::Object &obj)
-    : Breakpoint(obj), logMessage(std::string(GetString(obj, "logMessage"))),
+SourceBreakpoint::SourceBreakpoint(DAP *dap, const llvm::json::Object &obj)
+    : Breakpoint(dap, obj),
+      logMessage(std::string(GetString(obj, "logMessage"))),
       line(GetUnsigned(obj, "line", 0)), column(GetUnsigned(obj, "column", 0)) 
{
 }
 
 void SourceBreakpoint::SetBreakpoint(const llvm::StringRef source_path) {
+  if (!dap)
----------------
ashgti wrote:

It would happen if a breakpoint outlived the dap or was incorrectly 
initialized. However, I replaced the `DAP*` with a `DAP&`, which means this 
shouldn't happen anymore.

https://github.com/llvm/llvm-project/pull/114881
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to