Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix STL to Godot type conversion of polypartition #48921

Merged
merged 1 commit into from
May 21, 2021

Conversation

timothyqiu
Copy link
Member

This PR fixes #48352.

  • Use iter = iter->next() to advance iterator instead of STL iter++
  • Unlike std::set::lower_bound, Godot's Set::lower_bound may also return nullptr on failure

The 3.x branch uses an older version of polypartition, only the null pointer check of lower_bound is necessary.

@timothyqiu timothyqiu requested a review from a team as a code owner May 21, 2021 09:33
@akien-mga akien-mga added this to the 4.0 milestone May 21, 2021
@akien-mga akien-mga added cherrypick:3.3 cherrypick:3.x Considered for cherry-picking into a future 3.x release labels May 21, 2021
@Xrayez
Copy link
Contributor

Xrayez commented May 21, 2021

May help the crash I've experienced with it in Goost as described in #16423 (comment) and #45125 (comment).

@akien-mga
Copy link
Member

The 3.x branch uses an older version of polypartition, only the null pointer check of lower_bound is necessary.

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 21, 2021
@akien-mga akien-mga merged commit 8c2beee into godotengine:master May 21, 2021
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the polypartition-stl branch May 21, 2021 13:05
@akien-mga
Copy link
Member

Cherry-picked for 3.3.2.

@akien-mga akien-mga changed the title Fix STL to Godot type convertion of polypartition Fix STL to Godot type conversion of polypartition May 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Immediate crash on opening godot project with Blender FBX file
3 participants