diff --git a/arangod/Cluster/ClusterInfo.cpp b/arangod/Cluster/ClusterInfo.cpp index 984cf05933..3655428e70 100644 --- a/arangod/Cluster/ClusterInfo.cpp +++ b/arangod/Cluster/ClusterInfo.cpp @@ -2873,6 +2873,11 @@ int ClusterInfo::ensureIndexCoordinatorInner(std::string const& databaseName, // Finally check if it has appeared, if not, we take another turn, // which does not do any harm: auto coll = getCollection(databaseName, collectionID); + if (coll == nullptr) { + errorMsg = "The collection has gone. Aborting index creation"; + return TRI_ERROR_ARANGO_INDEX_CREATION_FAILED; + } + auto indexes = coll->getIndexes(); if (std::any_of(indexes.begin(), indexes.end(), [indexId](std::shared_ptr& index) -> bool {