diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp index 96da458be21d11..170fa88f1e8b84 100644 --- a/lldb/tools/lldb-dap/lldb-dap.cpp +++ b/lldb/tools/lldb-dap/lldb-dap.cpp @@ -977,7 +977,7 @@ void request_disconnect(const llvm::json::Object &request) { g_dap.debugger.SetAsync(false); lldb::SBError error = terminateDebuggee ? process.Kill() : process.Detach(); if (!error.Success()) - response.try_emplace("error", error.GetCString()); + EmplaceSafeString(response, "error", error.GetCString()); g_dap.debugger.SetAsync(true); break; }