Skip to content

Commit 8920b25

Browse files
authored
Merge pull request tinyobjloader#235 from SergeyXa/shapes-being-skipped-bugfix
Fix: Some data may be ignored when loading objects from .obj
2 parents 9bbefcf + 565de1d commit 8920b25

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tiny_obj_loader.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2438,7 +2438,10 @@ bool LoadObj(attrib_t *attrib, std::vector<shape_t> *shapes,
24382438
// flush previous face group.
24392439
bool ret = exportGroupsToShape(&shape, prim_group, tags, material, name,
24402440
triangulate, v);
2441-
if (ret) {
2441+
(void)ret; // return value not used.
2442+
2443+
if (shape.mesh.indices.size() > 0 || shape.lines.indices.size() > 0 ||
2444+
shape.points.indices.size() > 0) {
24422445
shapes->push_back(shape);
24432446
}
24442447

0 commit comments

Comments
 (0)