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
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-08-27 16:58:58 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-08-27 16:58:58 +0300
commitd667105ba96c777ff8eeefc25e5148d5086087f6 (patch)
treece98a70c9f8c111aa103a592c947c60480e1e40c /source/blender/blenkernel/intern/gpencil_modifier.c
parent0067b3b09b1c74809d03480fea1292246b45fa65 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil_modifier.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil_modifier.c6
1 files changed, 4 insertions, 2 deletions
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;