diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-26 14:12:49 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-26 14:12:49 +0300 |
commit | d06d1937efe107491aea30e9fcbb6f5fd6a5ca0b (patch) | |
tree | 75ed1629c2093c399f26e676d17853b539554f00 /source/blender | |
parent | 2e9b86923c30a5122bf1d6225578bbee35f85c0f (diff) |
GP: Check weight data before using it
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c index 613c46803b9..3f4183e5b7a 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c @@ -168,9 +168,10 @@ static void generate_geometry( /* Duplicate stroke */ bGPDstroke *gps_dst = MEM_dupallocN(gps); gps_dst->points = MEM_dupallocN(gps->points); - gps_dst->dvert = MEM_dupallocN(gps->dvert); - BKE_gpencil_stroke_weights_duplicate(gps, gps_dst); - + if (gps->dvert) { + gps_dst->dvert = MEM_dupallocN(gps->dvert); + BKE_gpencil_stroke_weights_duplicate(gps, gps_dst); + } gps_dst->triangles = MEM_dupallocN(gps->triangles); /* Move points */ |