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
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-04-19 11:25:52 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-04-19 11:25:52 +0300
commit79899373eb42895aaba7636dd1819bc89dc7c632 (patch)
tree027144faf94c99f39810ffa25673a2156542584a /source
parent8a923e5295ab10c6f0a3976f9fbf0b70856fd204 (diff)
Finish use-after-free in workbench code.
GHash should probably not own the data itself, but that's other question to be fixed later, at least this fixes the crash. Solution by @fclem, thanks!
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/workbench/solid_studio_mode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/solid_studio_mode.c b/source/blender/draw/engines/workbench/solid_studio_mode.c
index e687debe319..35426e84808 100644
--- a/source/blender/draw/engines/workbench/solid_studio_mode.c
+++ b/source/blender/draw/engines/workbench/solid_studio_mode.c
@@ -71,9 +71,8 @@ static void workbench_solid_studio_cache_populate(void *vedata, Object *ob)
workbench_materials_solid_cache_populate(data, ob, V3D_LIGHTING_STUDIO);
}
-static void workbench_solid_studio_cache_finish(void *vedata)
+static void workbench_solid_studio_cache_finish(void *UNUSED(vedata))
{
- workbench_materials_cache_finish((WORKBENCH_Data *)vedata);
}
static void workbench_solid_studio_draw_scene(void *vedata)
@@ -83,6 +82,8 @@ static void workbench_solid_studio_draw_scene(void *vedata)
DRW_draw_pass(psl->depth_pass);
DRW_draw_pass(psl->solid_pass);
+
+ workbench_materials_cache_finish((WORKBENCH_Data *)vedata);
}
static void workbench_solid_studio_engine_free(void)