diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-05 18:27:24 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-05 18:27:24 +0400 |
commit | 25cbd13d22218e307ca09e343b3f7e6e9f21a095 (patch) | |
tree | 85e0040084fd8b4dde93c4c4eaf5f4b6b583c9dd | |
parent | 4c3d5a4294756944eba2ab536751e38eecc2bd8d (diff) |
Workaround for deadlock in face/hole merge function in carve
which could happen in cases of degenerated faces.
-rw-r--r-- | extern/carve/lib/intersect_face_division.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/extern/carve/lib/intersect_face_division.cpp b/extern/carve/lib/intersect_face_division.cpp index c74b52dd557..c5d5d8c5152 100644 --- a/extern/carve/lib/intersect_face_division.cpp +++ b/extern/carve/lib/intersect_face_division.cpp @@ -719,6 +719,10 @@ namespace { unassigned--; } } + + if (!removed.size()) + throw carve::exception("Failed to merge holes"); + for (std::set<int>::iterator f = removed.begin(); f != removed.end(); ++f) { for (unsigned i = 0; i < containing_faces.size(); ++i) { containing_faces[i].erase(std::remove(containing_faces[i].begin(), |