[editor only] fix a possible NPE during polygonize check

This commit is contained in:
fgnm
2023-11-20 12:29:28 +01:00
parent 423bd61c5b
commit 7859d05e99
@@ -137,7 +137,9 @@ public class PolygonTool extends SelectionTool implements PolygonTransformationL
points.reverse();
}
polygonShapeComponent.polygonizedVertices = PolygonRuntimeUtils.polygonize(points.toArray());
} else {
}
if (intersections != null || polygonShapeComponent.polygonizedVertices == null) {
// restore from backup
polygonShapeComponent.vertices = UpdatePolygonVerticesCommand.cloneData(verticesBackup);
polygonShapeComponent.polygonizedVertices = UpdatePolygonVerticesCommand.cloneData(polygonizedVerticesBackup);