diff --git a/src/graph/graph.hh b/src/graph/graph.hh index d944bf357..881329807 100644 --- a/src/graph/graph.hh +++ b/src/graph/graph.hh @@ -1871,8 +1871,8 @@ public: TRY (graph_result_t::from (queue, ALLOCATION_FAILURE)); hb_vector_t visited; - visited.resize (vertices_.length); - TRY (graph_result_t::from (visited, ALLOCATION_FAILURE)); + if (unlikely (!visited.resize (vertices_.length))) + return Err(ALLOCATION_FAILURE); while (!queue.in_error () && !queue.is_empty ()) {