diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 15:34:53 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-05 15:34:53 +0400 |
commit | c4a422ffbb6ec5d8749099f1bca318cfd15e408b (patch) | |
tree | 126c62c24ba13a0a1ebfcdb78cd129253552eb46 /extern/carve/lib/intersect_face_division.cpp | |
parent | 77bf273e1b4dd1eabddf0cff5a401951332e81d6 (diff) |
Fix/workaround for carve aborts on windows
The issue was caused by passing start iterator larger than end iterator
to std::copy in triangulation module. It'll do nothing on linux but will
throw an exception on windows. Now behavior will be identical on both
platforms.
Proper solution would be to figure out why exactly this happened, but it's
easier to be forwarded to Tobias and we'll need to get rid of triangulation
anyway.
This should solve issues:
#30100: boolean intersect crashes blender
#33001: Crash on applying Boolean difference modifier
#33045: Boolean modifier crash with mirrored objects
Diffstat (limited to 'extern/carve/lib/intersect_face_division.cpp')
-rw-r--r-- | extern/carve/lib/intersect_face_division.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extern/carve/lib/intersect_face_division.cpp b/extern/carve/lib/intersect_face_division.cpp index 08550c021ad..c74b52dd557 100644 --- a/extern/carve/lib/intersect_face_division.cpp +++ b/extern/carve/lib/intersect_face_division.cpp @@ -1106,7 +1106,8 @@ namespace { } // copy up to the end of the path. - std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out)); + if (pos < e1_1) + std::copy(base_loop.begin() + pos, base_loop.begin() + e1_1, std::back_inserter(out)); CARVE_ASSERT(base_loop[e1_1] == p1.back()); std::copy(p1.rbegin(), p1.rend() - 1, std::back_inserter(out)); |