diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-17 21:01:51 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-17 21:02:10 +0300 |
commit | e09f0caff32e61095c3349daa394e1a45b18a893 (patch) | |
tree | 927f5ba240a6c1fa8f554a2c63f3ba5f2a872705 /source/blender | |
parent | ba3d49225c9ff3514fb87ae5d692baefe5edec30 (diff) |
GPencil: Fix crash joining objects
The weights array can be NULL.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 13e1be329c7..7ba4637f9d8 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -2627,8 +2627,11 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op) LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) { MDeformVert *dvert; int i; + if (gps->dvert == NULL) { + continue; + } for (i = 0, dvert = gps->dvert; i < gps->totpoints; i++, dvert++) { - if ((dvert->dw) && (dvert->dw->def_nr == old_idx)) { + if ((dvert->dw != NULL) && (dvert->dw->def_nr == old_idx)) { dvert->dw->def_nr = idx; } } |