[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27441] trunk/blender/source/blender/ blenlib/intern/threads.c: Fix crash in compositing nodes, due to threading problem.

Brecht Van Lommel brecht at blender.org
Fri Mar 12 14:07:25 CET 2010


Revision: 27441
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27441
Author:   blendix
Date:     2010-03-12 14:07:25 +0100 (Fri, 12 Mar 2010)

Log Message:
-----------
Fix crash in compositing nodes, due to threading problem.

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/threads.c

Modified: trunk/blender/source/blender/blenlib/intern/threads.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/threads.c	2010-03-12 12:29:12 UTC (rev 27440)
+++ trunk/blender/source/blender/blenlib/intern/threads.c	2010-03-12 13:07:25 UTC (rev 27441)
@@ -229,8 +229,8 @@
 	
 	for(tslot= threadbase->first; tslot; tslot= tslot->next) {
 		if(tslot->callerdata==callerdata) {
+			pthread_join(tslot->pthread, NULL);
 			tslot->callerdata= NULL;
-			pthread_join(tslot->pthread, NULL);
 			tslot->avail= 1;
 		}
 	}
@@ -243,8 +243,8 @@
 	
 	for(tslot = threadbase->first; tslot; tslot = tslot->next, counter++) {
 		if (counter == index && tslot->avail == 0) {
+			pthread_join(tslot->pthread, NULL);
 			tslot->callerdata = NULL;
-			pthread_join(tslot->pthread, NULL);
 			tslot->avail = 1;
 			break;
 		}
@@ -257,8 +257,8 @@
 	
 	for(tslot = threadbase->first; tslot; tslot = tslot->next) {
 		if (tslot->avail == 0) {
+			pthread_join(tslot->pthread, NULL);
 			tslot->callerdata = NULL;
-			pthread_join(tslot->pthread, NULL);
 			tslot->avail = 1;
 		}
 	}





More information about the Bf-blender-cvs mailing list