Fix T61028: Crash when entering wireframe view
authorClément Foucault <foucault.clem@gmail.com>
Thu, 31 Jan 2019 00:33:59 +0000 (01:33 +0100)
committerClément Foucault <foucault.clem@gmail.com>
Thu, 31 Jan 2019 00:35:09 +0000 (01:35 +0100)
source/blender/draw/engines/workbench/workbench_forward.c

index 413ab36..32cd10f 100644 (file)
@@ -303,14 +303,11 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
        float light_direction[3];
        workbench_private_data_get_light_direction(wpd, light_direction);
 
-       if (!e_data.next_object_id) {
-               e_data.next_object_id = 1;
-
+       if (!e_data.checker_depth_sh) {
                workbench_forward_outline_shaders_ensure(wpd);
 
                e_data.checker_depth_sh = DRW_shader_create_fullscreen(
                        datatoc_workbench_checkerboard_depth_frag_glsl, NULL);
-
        }
        workbench_volume_engine_init();
        workbench_fxaa_engine_init();