[Bf-blender-cvs] [79899373eb4] blender2.8: Finish use-after-free in workbench code.
Bastien Montagne
noreply at git.blender.org
Thu Apr 19 10:27:47 CEST 2018
Commit: 79899373eb42895aaba7636dd1819bc89dc7c632
Author: Bastien Montagne
Date: Thu Apr 19 10:25:52 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB79899373eb42895aaba7636dd1819bc89dc7c632
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!
===================================================================
M source/blender/draw/engines/workbench/solid_studio_mode.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list