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.
This commit is contained in:
2011-12-13 10:07:22 +00:00
parent 5e586fa0ca
commit 8b6100aa26

View File

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