Add additional nullptr check

pull/17738/head
ncteisen 6 years ago
parent 92c4dffc17
commit 6e3fee6f2a
  1. 4
      src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc

@ -1207,7 +1207,9 @@ void GrpcLb::FillChildRefsForChannelz(
channelz::ChildRefsList* child_subchannels,
channelz::ChildRefsList* child_channels) {
// delegate to the RoundRobin to fill the children subchannels.
rr_policy_->FillChildRefsForChannelz(child_subchannels, child_channels);
if (rr_policy_ != nullptr) {
rr_policy_->FillChildRefsForChannelz(child_subchannels, child_channels);
}
if (lb_channel_ != nullptr) {
grpc_core::channelz::ChannelNode* channel_node =
grpc_channel_get_channelz_node(lb_channel_);

Loading…
Cancel
Save