Fix #34249: collapse edges crash blender with a specific mesh
OpenMP block was using shared variable, which for sure leads to threading issues.
This commit is contained in:
parent
2d2164f10b
commit
fdb25a1d27
@ -595,13 +595,13 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *UNUSED(op), const char hty
|
|||||||
|
|
||||||
const char flag_types[3] = {BM_VERT, BM_EDGE, BM_FACE};
|
const char flag_types[3] = {BM_VERT, BM_EDGE, BM_FACE};
|
||||||
|
|
||||||
BMIter iter;
|
|
||||||
BMElemF *ele;
|
BMElemF *ele;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#pragma omp parallel for schedule(dynamic) if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT)
|
#pragma omp parallel for schedule(dynamic) if (bm->totvert + bm->totedge + bm->totface >= BM_OMP_LIMIT)
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (htype & flag_types[i]) {
|
if (htype & flag_types[i]) {
|
||||||
|
BMIter iter;
|
||||||
BM_ITER_MESH (ele, &iter, bm, iter_types[i]) {
|
BM_ITER_MESH (ele, &iter, bm, iter_types[i]) {
|
||||||
BMO_elem_flag_disable(bm, ele, oflag);
|
BMO_elem_flag_disable(bm, ele, oflag);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user