From 14e4fb2773c57283694dc7912cdfd47e67e54dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 13 Nov 2018 11:21:32 +0100 Subject: GPU: Fix crash at startup --- source/blender/gpu/intern/gpu_batch_presets.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/gpu/intern/gpu_batch_presets.c b/source/blender/gpu/intern/gpu_batch_presets.c index 562971c760d..629ab04bf24 100644 --- a/source/blender/gpu/intern/gpu_batch_presets.c +++ b/source/blender/gpu/intern/gpu_batch_presets.c @@ -201,6 +201,8 @@ static GPUBatch *batch_sphere_wire(int lat_res, int lon_res) void gpu_batch_presets_init(void) { + BLI_mutex_init(&g_presets_3d.mutex); + /* Hard coded resolution */ g_presets_3d.batch.sphere_low = gpu_batch_sphere(8, 16); gpu_batch_presets_register(g_presets_3d.batch.sphere_low); @@ -216,8 +218,6 @@ void gpu_batch_presets_init(void) g_presets_3d.batch.sphere_wire_med = batch_sphere_wire(8, 16); gpu_batch_presets_register(g_presets_3d.batch.sphere_wire_med); - - BLI_mutex_init(&g_presets_3d.mutex); } void gpu_batch_presets_register(GPUBatch *preset_batch) -- cgit v1.2.3