diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-19 18:26:09 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-19 18:26:09 +0300 |
commit | e81f7f25acb0687a3d037fa7e39420bc4a6d23a8 (patch) | |
tree | 3054539aa39720b866dd78f77f41088efe960063 /source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c | |
parent | 03bb7cd9ad438d5925b84bc6819d83dfe6cbd05e (diff) |
GP: Verify weight data is correct before assigning
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c index 1ba2a08acdb..08416f061fe 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c @@ -249,7 +249,7 @@ static void deformStroke( /* loop points and apply deform */ for (int i = 0; i < gps->totpoints; i++) { bGPDspoint *pt = &gps->points[i]; - MDeformVert *dvert = &gps->dvert[i]; + MDeformVert *dvert = gps->dvert != NULL ? &gps->dvert[i] : NULL; /* verify vertex group */ const float weight = get_modifier_point_weight(dvert, (mmd->flag & GP_HOOK_INVERT_VGROUP) != 0, def_nr); |