Skip to content

Commit e592f27

Browse files
committed
smal check to avoid segfaults
1 parent a030d10 commit e592f27

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/reactor-cpp/graph.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ public:
253253
auto spanning_tree = naive_spanning_tree(source);
254254

255255
for (auto& path : spanning_tree) {
256+
if (path.empty()) {
257+
continue;
258+
}
259+
256260
ConnectionProperties merged_properties{};
257261
auto* final_destination = std::get<2>(*std::begin(path));
258262
std::size_t current_rating = 0;

0 commit comments

Comments
 (0)