[graph] Error check
diff --git a/src/graph/graph.hh b/src/graph/graph.hh
index e464d17..18f329b 100644
--- a/src/graph/graph.hh
+++ b/src/graph/graph.hh
@@ -280,7 +280,8 @@
       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)