Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-12-13 14:07:22 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-12-13 14:07:22 +0400
commit8b6100aa26d20d0f8ded4df4550e35749dd803eb (patch)
tree4a453363973e7cef0a7ed96906ffa42900d36b0f /source/blender
parent5e586fa0ca07242c2c42f59174acfb17dbd94073 (diff)
Fixed crash when tracking several tracks manually
Crash was caused by non-threadsafe guarded allocatio which becomes threadsafe only when thread was started using BLI_threads module.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/tracking.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index cacea980fe2..3543d361ab0 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -48,6 +48,7 @@
#include "BLI_ghash.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
+#include "BLI_threads.h"
#include "BKE_global.h"
#include "BKE_tracking.h"
@@ -830,6 +831,8 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
context->clip= clip;
context->user= *user;
+ BLI_begin_threaded_malloc();
+
return context;
}
@@ -856,6 +859,8 @@ static void track_context_free(void *customdata)
void BKE_tracking_context_free(MovieTrackingContext *context)
{
+ BLI_end_threaded_malloc();
+
tracks_map_free(context->tracks_map, track_context_free);
MEM_freeN(context);