diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-11-13 13:21:32 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-11-13 13:22:28 +0300 |
commit | 14e4fb2773c57283694dc7912cdfd47e67e54dea (patch) | |
tree | f9f1a3000766d281dd87eac70daad6b4b265a4f4 /source/blender/gpu/intern/gpu_batch_presets.c | |
parent | f4d4f502122aaf7df65cc8d3beeb86a9f444712b (diff) |
GPU: Fix crash at startup
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch_presets.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch_presets.c | 4 |
1 files 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) |