Commit: 82d88e42a56dee8e16c7347750510c43225ff414
Author: Bastien Montagne
Date: Mon Jan 4 17:23:54 2016 +0100
Branches: master
https://developer.blender.org/rB82d88e42a56dee8e16c7347750510c43225ff414
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.
===================================================================
M source/blender/blenlib/intern/task.c
===================================================================
diff --git a/source/blender/blenlib/intern/task.c
b/source/blender/blenlib/intern/task.c
index d3b11d8..2be688a 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.
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs