Fix STL to Godot type convertion of polypartition

(cherry picked from commit d16bef8b55)
This commit is contained in:
Haoyu Qiu 2021-05-21 17:12:13 +08:00 committed by Rémi Verschelde
parent 738d0b7f63
commit 20dfa4ceaa
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1166,7 +1166,7 @@ int TriangulatorPartition::MonotonePartition(List<TriangulatorPoly> *inpolys, Li
newedge.p1 = v->p;
newedge.p2 = v->p;
edgeIter = edgeTree.lower_bound(newedge);
if(edgeIter == edgeTree.front()) {
if(edgeIter == nullptr || edgeIter == edgeTree.front()) {
error = true;
break;
}
@ -1202,7 +1202,7 @@ int TriangulatorPartition::MonotonePartition(List<TriangulatorPoly> *inpolys, Li
newedge.p1 = v->p;
newedge.p2 = v->p;
edgeIter = edgeTree.lower_bound(newedge);
if(edgeIter == edgeTree.front()) {
if(edgeIter == nullptr || edgeIter == edgeTree.front()) {
error = true;
break;
}
@ -1241,7 +1241,7 @@ int TriangulatorPartition::MonotonePartition(List<TriangulatorPoly> *inpolys, Li
newedge.p1 = v->p;
newedge.p2 = v->p;
edgeIter = edgeTree.lower_bound(newedge);
if(edgeIter == edgeTree.front()) {
if(edgeIter == nullptr || edgeIter == edgeTree.front()) {
error = true;
break;
}