diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 21:00:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-10-31 21:00:59 +0400 |
commit | 4e0d8ccf9619f72fb6cbca1d18647f9dff1f0d73 (patch) | |
tree | 2bd53384c66578fdd787b674823b599f27e071ae /source/blender/blenlib/intern | |
parent | bdb279ec5b4f8537bc30a54bef814bd47f2aef1e (diff) |
Fix #29084: material/texture nodes crash introduced in 2.60, execdata is being
lazely created but this wasn't done in a thread safe way.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/threads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/threads.c b/source/blender/blenlib/intern/threads.c index c049ab85546..7b156a3ac52 100644 --- a/source/blender/blenlib/intern/threads.c +++ b/source/blender/blenlib/intern/threads.c @@ -113,6 +113,7 @@ static pthread_mutex_t _viewer_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _custom1_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _rcache_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t _opengl_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t _nodes_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_t mainid; static int thread_levels= 0; /* threads can be invoked inside threads */ @@ -347,6 +348,8 @@ void BLI_lock_thread(int type) pthread_mutex_lock(&_rcache_lock); else if (type==LOCK_OPENGL) pthread_mutex_lock(&_opengl_lock); + else if (type==LOCK_NODES) + pthread_mutex_lock(&_nodes_lock); } void BLI_unlock_thread(int type) @@ -363,6 +366,8 @@ void BLI_unlock_thread(int type) pthread_mutex_unlock(&_rcache_lock); else if(type==LOCK_OPENGL) pthread_mutex_unlock(&_opengl_lock); + else if(type==LOCK_NODES) + pthread_mutex_unlock(&_nodes_lock); } /* Mutex Locks */ |