[Bf-blender-cvs] [6e57534eaab] master: Fix T60671: GP weight paint crash when smoothing weights

Antonioya noreply at git.blender.org
Sun Jan 20 19:37:29 CET 2019


Commit: 6e57534eaabef106a4c9c82f3d57e14a362dcceb
Author: Antonioya
Date:   Sun Jan 20 19:37:13 2019 +0100
Branches: master
https://developer.blender.org/rB6e57534eaabef106a4c9c82f3d57e14a362dcceb

Fix T60671: GP weight paint crash when smoothing weights

===================================================================

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 b2ceacf9398..26a05363888 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1797,6 +1797,10 @@ static int gpencil_vertex_group_smooth_exec(bContext *C, wmOperator *op)
 
 	CTX_DATA_BEGIN(C, bGPDstroke *, gps, editable_gpencil_strokes)
 	{
+		if (gps->dvert == NULL) {
+			continue;
+		}
+
 		for (int s = 0; s < repeat; s++) {
 			for (int i = 0; i < gps->totpoints; i++) {
 				/* previous point */



More information about the Bf-blender-cvs mailing list