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:
authorClément Foucault <foucault.clem@gmail.com>2018-11-13 13:21:32 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-13 13:22:28 +0300
commit14e4fb2773c57283694dc7912cdfd47e67e54dea (patch)
treef9f1a3000766d281dd87eac70daad6b4b265a4f4 /source/blender/gpu/intern/gpu_batch_presets.c
parentf4d4f502122aaf7df65cc8d3beeb86a9f444712b (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.c4
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)