Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern/BLI_mempool.c')
-rw-r--r--source/blender/blenlib/intern/BLI_mempool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index 448fefa5979..8fc5f97221d 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -409,7 +409,9 @@ void BLI_mempool_free(BLI_mempool *pool, void *addr)
#endif
/* nothing is in use; free all the chunks except the first */
- if (UNLIKELY(pool->totused == 0)) {
+ if (UNLIKELY(pool->totused == 0) &&
+ (pool->chunks->next))
+ {
const unsigned int esize = pool->esize;
BLI_freenode *curnode;
unsigned int j;