[repacker] use possibly updated root idx after isolate_subgraph.

isolate_subgraph can change the root indices in some cases. So operations after the isolation need to use the roots from the output of isolate_subgraph.
This commit is contained in:
Garret Rieger 2021-10-13 14:40:00 -07:00
parent 5b882c420a
commit d17155f5d2
1 changed files with 2 additions and 1 deletions

View File

@ -1048,7 +1048,8 @@ static bool _try_isolating_subgraphs (const hb_vector_t<graph_t::overflow_record
hb_set_t roots;
roots.add (root);
sorted_graph.isolate_subgraph (roots);
sorted_graph.move_to_new_space (root);
for (unsigned new_root : roots)
sorted_graph.move_to_new_space (new_root);
return true;
}
return false;