[Impeller] Fix SceneC crash for nodes with children (flutter/engine#38346)

This commit is contained in:
Brandon DeRosier 2022-12-16 10:35:10 -08:00 committed by GitHub
parent 5f1aeb0603
commit b74e879a3f
3 changed files with 6 additions and 2 deletions

View File

@ -34,7 +34,10 @@ impeller_shaders("shader_fixtures") {
}
scenec("scene_fixtures") {
geometry = [ "flutter_logo.glb" ]
geometry = [
"flutter_logo.glb",
"two_triangles.glb",
]
type = "gltf"
}
@ -79,6 +82,7 @@ test_fixtures("file_fixtures") {
"table_mountain_py.png",
"table_mountain_pz.png",
"test_texture.frag",
"two_triangles.glb",
"types.h",
"wtf.otf",
]

Binary file not shown.

View File

@ -189,7 +189,7 @@ static void ProcessNode(const tinygltf::Model& gltf,
/// Children.
///
for (size_t node_i = 0; node_i < out_node.children.size(); node_i++) {
for (size_t node_i = 0; node_i < in_node.children.size(); node_i++) {
auto child = std::make_unique<fb::NodeT>();
ProcessNode(gltf, gltf.nodes[in_node.children[node_i]], *child);
out_node.children.push_back(std::move(child));