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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-01-04 19:23:54 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-01-04 21:17:09 +0300
commit82d88e42a56dee8e16c7347750510c43225ff414 (patch)
tree3aa3f7b4159fcba6cb40148945dc6c3db0a03d94 /source/blender/blenlib
parent17eb5b3af6ffeeb8d931ceaaf56fe82e40d8c084 (diff)
BLI_task threaded looper: do not assert when start == stop.
This can happen quite often in forloops, and would be annoying to have to check for this in caller code! So now, just return without doing anything in this case.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/task.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/task.c b/source/blender/blenlib/intern/task.c
index d3b11d8e6d0..2be688a3d8c 100644
--- a/source/blender/blenlib/intern/task.c
+++ b/source/blender/blenlib/intern/task.c
@@ -662,7 +662,11 @@ void BLI_task_parallel_range_ex(
ParallelRangeState state;
int i, num_threads, num_tasks;
- BLI_assert(start < stop);
+ if (start == stop) {
+ return;
+ }
+
+ BLI_assert(start <= stop);
/* If it's not enough data to be crunched, don't bother with tasks at all,
* do everything from the main thread.