From 1ef316dff35a8658d92b441af8e7a8904346b3f6 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Sun, 17 Nov 2024 21:24:25 +0200 Subject: [PATCH] chore: fix a potential crash during client list --- src/facade/dragonfly_connection.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/facade/dragonfly_connection.cc b/src/facade/dragonfly_connection.cc index eb4ca8c5e84c..7502bf2c25cb 100644 --- a/src/facade/dragonfly_connection.cc +++ b/src/facade/dragonfly_connection.cc @@ -819,9 +819,10 @@ std::pair Connection::GetClientInfoBeforeAfterTid() co string_view phase_name = PHASE_NAMES[phase_]; if (cc_) { - DCHECK(reply_builder_); string cc_info = service_->GetContextInfo(cc_.get()).Format(); - if (reply_builder_->IsSendActive()) + + // reply_builder_ may be null if the connection is in the setup phase, for example. + if (reply_builder_ && reply_builder_->IsSendActive()) phase_name = "send"; absl::StrAppend(&after, " ", cc_info); }