From d667105ba96c777ff8eeefc25e5148d5086087f6 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 27 Aug 2019 15:58:58 +0200 Subject: Fix T69210: Crash on Making GPencil Materials zero user The evaluated data must not copy the material if it's NULL. Still the stroke exists in the file, so maybe need some thinking in how resolve this, but anyway this is a different topic not related to bug. --- source/blender/blenkernel/intern/gpencil_modifier.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index daa63515c3d..1750a389788 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -797,8 +797,10 @@ static void gpencil_frame_copy_noalloc(Object *ob, bGPDframe *gpf, bGPDframe *gp /* copy color to temp fields to apply temporal changes in the stroke */ MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps_src->mat_nr + 1); - copy_v4_v4(gps_dst->runtime.tmp_stroke_rgba, gp_style->stroke_rgba); - copy_v4_v4(gps_dst->runtime.tmp_fill_rgba, gp_style->fill_rgba); + if (gp_style) { + copy_v4_v4(gps_dst->runtime.tmp_stroke_rgba, gp_style->stroke_rgba); + copy_v4_v4(gps_dst->runtime.tmp_fill_rgba, gp_style->fill_rgba); + } /* Save original pointers for using in edit and select operators. */ gps_dst->runtime.gps_orig = gps_src; -- cgit v1.2.3