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

Commit 38340bb

Browse files
authored
[Impeller] Fix SceneC crash for nodes with children (#38346)
1 parent 0c00bc0 commit 38340bb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

impeller/fixtures/BUILD.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ impeller_shaders("shader_fixtures") {
3434
}
3535

3636
scenec("scene_fixtures") {
37-
geometry = [ "flutter_logo.glb" ]
37+
geometry = [
38+
"flutter_logo.glb",
39+
"two_triangles.glb",
40+
]
3841
type = "gltf"
3942
}
4043

@@ -79,6 +82,7 @@ test_fixtures("file_fixtures") {
7982
"table_mountain_py.png",
8083
"table_mountain_pz.png",
8184
"test_texture.frag",
85+
"two_triangles.glb",
8286
"types.h",
8387
"wtf.otf",
8488
]

impeller/fixtures/two_triangles.glb

3.3 KB
Binary file not shown.

impeller/scene/importer/importer_gltf.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static void ProcessNode(const tinygltf::Model& gltf,
189189
/// Children.
190190
///
191191

192-
for (size_t node_i = 0; node_i < out_node.children.size(); node_i++) {
192+
for (size_t node_i = 0; node_i < in_node.children.size(); node_i++) {
193193
auto child = std::make_unique<fb::NodeT>();
194194
ProcessNode(gltf, gltf.nodes[in_node.children[node_i]], *child);
195195
out_node.children.push_back(std::move(child));

0 commit comments

Comments
 (0)