From 07e7033076d9acfeeaa7a91ea878fa130a022824 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 1 Aug 2023 12:25:45 -0600 Subject: [PATCH] [graph] Error check --- src/graph/graph.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/graph/graph.hh b/src/graph/graph.hh index e464d1746..18f329b64 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -280,7 +280,8 @@ struct graph_t for (auto _ : parents) new_parents.set (id_map[_.first], _.second); - parents = std::move (new_parents); + if (!new_parents.in_error ()) + parents = std::move (new_parents); } void remap_parent (unsigned old_index, unsigned new_index)