aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-04-14 17:34:01 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-04-14 17:34:01 -0700
commite2b86c74239603cdf84afdaf0ee201002abf3877 (patch)
treecd44640b3e8f9741661286becb92e6f37257df4e /src/core
parentde3eec4f83ce3d237f2fb534c94bf7cd356dfde3 (diff)
Fix crash
Diffstat (limited to 'src/core')
-rw-r--r--src/core/ext/lb_policy/pick_first/pick_first.c2
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);