summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/vespa/vdslib/distribution/distribution.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdslib/src/vespa/vdslib/distribution/distribution.cpp b/vdslib/src/vespa/vdslib/distribution/distribution.cpp
index 4c74923c58b..452c910298c 100644
--- a/vdslib/src/vespa/vdslib/distribution/distribution.cpp
+++ b/vdslib/src/vespa/vdslib/distribution/distribution.cpp
@@ -673,7 +673,7 @@ Distribution::splitNodesIntoLeafGroups(IndexList nodeList) const
std::vector<IndexList> result;
std::map<uint16_t, IndexList> nodes;
for (auto node : nodeList) {
- const Group* group(_node2Group[node]);
+ const Group* group((node < _node2Group.size()) ? _node2Group[node] : nullptr);
if (group == nullptr) {
LOGBP(warning, "Node %u is not assigned to a group. "
"Should not happen?", node);