Commit: d733826708f9b562687b78424e5c0835cba8c3c9
Author: Bastien Montagne
Date:   Thu Jun 9 17:53:51 2016 +0200
Branches: master
https://developer.blender.org/rBd733826708f9b562687b78424e5c0835cba8c3c9

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.

===================================================================

M       source/blender/blenlib/intern/BLI_mempool.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_mempool.c 
b/source/blender/blenlib/intern/BLI_mempool.c
index b7a51f2..783dba5 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -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);
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to