Fix T59527: Segment fault changing layer visibility and onion skin
In some situation when the layer is hidden, the onion skin must be disabled too, because the material is not available.
This commit is contained in:
parent
bef06a658a
commit
da8febb319
Notes:
blender-bot
2023-02-14 04:25:21 +01:00
Referenced by issue #60117, Stereoscopic previews options still there, but no effect Referenced by issue #59527, 2.8 crash when turning off the visual layers
|
@ -872,6 +872,9 @@ static void gpencil_draw_onion_strokes(
|
|||
|
||||
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
|
||||
MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
|
||||
if (gp_style == NULL) {
|
||||
continue;
|
||||
}
|
||||
copy_v4_v4(gps->runtime.tmp_stroke_rgba, gp_style->stroke_rgba);
|
||||
copy_v4_v4(gps->runtime.tmp_fill_rgba, gp_style->fill_rgba);
|
||||
|
||||
|
|
Loading…
Reference in New Issue