diff --git a/plugins/experimental/parent_select/consistenthash.cc b/plugins/experimental/parent_select/consistenthash.cc index 831caf92f8e..c50b5993edb 100644 --- a/plugins/experimental/parent_select/consistenthash.cc +++ b/plugins/experimental/parent_select/consistenthash.cc @@ -443,8 +443,10 @@ PLNextHopConsistentHash::next(TSHttpTxn txnp, void *strategyTxn, const char *exc } switch (ring_mode) { case PL_NH_ALTERNATE_RING: - if (groups > 0) { + if (pRec && groups > 0) { cur_ring = (pRec->group_index + 1) % groups; + } else { + cur_ring = 0; } break; case PL_NH_EXHAUST_RING: