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>2020-03-17 21:01:51 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-17 21:02:10 +0300
commite09f0caff32e61095c3349daa394e1a45b18a893 (patch)
tree927f5ba240a6c1fa8f554a2c63f3ba5f2a872705 /source/blender/editors/gpencil/gpencil_data.c
parentba3d49225c9ff3514fb87ae5d692baefe5edec30 (diff)
GPencil: Fix crash joining objects
The weights array can be NULL.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c5
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;
}
}