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);
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to