diff options
author | Craig Tiller <ctiller@google.com> | 2016-04-14 17:34:01 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-04-14 17:34:01 -0700 |
commit | e2b86c74239603cdf84afdaf0ee201002abf3877 (patch) | |
tree | cd44640b3e8f9741661286becb92e6f37257df4e /src/core | |
parent | de3eec4f83ce3d237f2fb534c94bf7cd356dfde3 (diff) |
Fix crash
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/lb_policy/pick_first/pick_first.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 5926f9d70b..0d215cd196 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -109,7 +109,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { if (selected != NULL) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, selected, NULL, NULL, &p->connectivity_changed); - } else { + } else if (p->num_subchannels > 0) { grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], NULL, NULL, &p->connectivity_changed); |