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/task_iterator.c')
-rw-r--r--source/blender/blenlib/intern/task_iterator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/task_iterator.c b/source/blender/blenlib/intern/task_iterator.c
index ee459ac2548..38271e5823f 100644
--- a/source/blender/blenlib/intern/task_iterator.c
+++ b/source/blender/blenlib/intern/task_iterator.c
@@ -37,8 +37,10 @@
/* Allows to avoid using malloc for userdata_chunk in tasks, when small enough. */
#define MALLOCA(_size) ((_size) <= 8192) ? alloca((_size)) : MEM_mallocN((_size), __func__)
#define MALLOCA_FREE(_mem, _size) \
- if (((_mem) != NULL) && ((_size) > 8192)) \
- MEM_freeN((_mem))
+ if (((_mem) != NULL) && ((_size) > 8192)) { \
+ MEM_freeN((_mem)); \
+ } \
+ ((void)0)
BLI_INLINE void task_parallel_calc_chunk_size(const TaskParallelSettings *settings,
const int tot_items,