Fix T48614: Blender from buildbot crash when Separate selection in this particular scene.

Regression from recent rB2c5dc66d5effd4072f438afb, if last item of last chunk of a mempool was valid,
it would not be returned by mempool iterator step, which would always return NULL in that case.
This commit is contained in:
Bastien Montagne 2016-06-09 17:53:51 +02:00
parent 20f0e2f342
commit d733826708
Notes: blender-bot 2023-02-14 11:28:39 +01:00
Referenced by issue #48614, Blender from buildbot crash when Separate selection in this particular scene
1 changed files with 1 additions and 1 deletions

View File

@ -622,7 +622,7 @@ void *BLI_mempool_iterstep(BLI_mempool_iter *iter)
iter->curindex = 0;
iter->curchunk = iter->curchunk->next;
if (iter->curchunk == NULL) {
return NULL;
return (ret->freeword == FREEWORD) ? NULL : ret;
}
curnode = CHUNK_DATA(iter->curchunk);
}