Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] Fix SceneC crash for nodes with children #38346

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion impeller/fixtures/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ impeller_shaders("shader_fixtures") {
}

scenec("scene_fixtures") {
geometry = [ "flutter_logo.glb" ]
geometry = [
"flutter_logo.glb",
"two_triangles.glb",
]
type = "gltf"
}

Expand Down Expand Up @@ -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",
]
Expand Down
Binary file added impeller/fixtures/two_triangles.glb
Binary file not shown.
2 changes: 1 addition & 1 deletion impeller/scene/importer/importer_gltf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down