[Bf-blender-cvs] [14e4fb2773c] blender2.8: GPU: Fix crash at startup
Clément Foucault
noreply at git.blender.org
Tue Nov 13 11:22:31 CET 2018
Commit: 14e4fb2773c57283694dc7912cdfd47e67e54dea
Author: Clément Foucault
Date: Tue Nov 13 11:21:32 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB14e4fb2773c57283694dc7912cdfd47e67e54dea
GPU: Fix crash at startup
===================================================================
M source/blender/gpu/intern/gpu_batch_presets.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list