[Bf-blender-cvs] [e09f0caff32] master: GPencil: Fix crash joining objects
Antonio Vazquez
noreply at git.blender.org
Tue Mar 17 19:02:15 CET 2020
Commit: e09f0caff32e61095c3349daa394e1a45b18a893
Author: Antonio Vazquez
Date: Tue Mar 17 19:01:51 2020 +0100
Branches: master
https://developer.blender.org/rBe09f0caff32e61095c3349daa394e1a45b18a893
GPencil: Fix crash joining objects
The weights array can be NULL.
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
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;
}
}
More information about the Bf-blender-cvs
mailing list