Fix for empty sorted_nodes

This commit is contained in:
Konstantin Bogdanov 2024-02-06 21:44:45 +01:00
parent 942addfa8c
commit d64db12f72
Signed by: thevar1able
GPG Key ID: DB399448D9FE52F1

View File

@ -703,6 +703,9 @@ std::vector<std::vector<StorageID>> TablesDependencyGraph::getTablesSplitByDepen
{
std::vector<std::vector<StorageID>> tables_split_by_level;
auto sorted_nodes = getNodesSortedByLevel();
if (sorted_nodes.empty())
return tables_split_by_level;
tables_split_by_level.resize(sorted_nodes.back()->level + 1);
for (const auto * node : sorted_nodes)
{