Fix crash validating mesh polygons with invalid loop-start

Add check for negative loop-start,
fixes crash validating test file from T67605.
This commit is contained in:
Campbell Barton 2019-07-25 13:23:05 +10:00
parent 419f137c64
commit 2e92791074
Notes: blender-bot 2023-02-14 02:27:56 +01:00
Referenced by issue #67605, new view layer causes crash
1 changed files with 1 additions and 1 deletions

View File

@ -1200,7 +1200,7 @@ void BKE_mesh_strip_loose_polysloops(Mesh *me)
int i = p->loopstart;
int stop = i + p->totloop;
if (stop > me->totloop || stop < i) {
if (stop > me->totloop || stop < i || p->loopstart < 0) {
invalid = true;
}
else {