[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58710] branches/soc-2013-depsgraph_mt/ source/blender/blenlib/intern/task.c: Checking unsigned value against >= 0 didn't make sense

Sergey Sharybin sergey.vfx at gmail.com
Mon Jul 29 08:49:12 CEST 2013


Revision: 58710
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58710
Author:   nazgul
Date:     2013-07-29 06:49:11 +0000 (Mon, 29 Jul 2013)
Log Message:
-----------
Checking unsigned value against >= 0 didn't make sense

Replaced with check of whether there're tasks in the pool
before removing one.

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/task.c

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/task.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/task.c	2013-07-29 06:04:09 UTC (rev 58709)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/task.c	2013-07-29 06:49:11 UTC (rev 58710)
@@ -72,10 +72,12 @@
 static void task_pool_num_decrease(TaskPool *pool, size_t done)
 {
 	BLI_mutex_lock(&pool->num_mutex);
+
+	BLI_assert(pool->num >= done);
+
 	pool->num -= done;
 	pool->done += done;
 
-	BLI_assert(pool->num >= 0);
 	if (pool->num == 0)
 		BLI_condition_notify_all(&pool->num_cond);
 




More information about the Bf-blender-cvs mailing list