mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-06 10:36:12 +03:00
The ChFi3d_IsInFront code is currently not handling all the combinations correctly. For example, if `if(fd1->IndexOfS2() == fd2->IndexOfS2())` is true, it can happen that the `TopoDS::Face(DStr.Shape(fd1->Index(jf1)))` returns a Face with entity == NULL. The subsequent usage of this NULL face in `BRep_Tool::Parameters( Vtx, face )` will then cause a segfault. While the best approach would be to identify the implementation bug in the algorithm behind PChFi3d_IsInFron, a check + exception is used instead because the actual algorithm is not known. Signed-off-by: Charlemagne Lasse <charlemagnelasse@gmail.com>