[Bf-blender-cvs] [2f1f4b5115e] greasepencil-object: Cleanup code

Antonioya noreply at git.blender.org
Wed Aug 29 11:06:44 CEST 2018


Commit: 2f1f4b5115e8507555e09b29276bb10ad33ba3b1
Author: Antonioya
Date:   Wed Aug 29 10:54:07 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB2f1f4b5115e8507555e09b29276bb10ad33ba3b1

Cleanup code

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

M	source/blender/editors/gpencil/gpencil_fill.c
M	source/blender/editors/gpencil/gpencil_paint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index f494acb8538..a39e4848ff5 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -823,7 +823,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
 	}
 
 	bGPDspoint *pt;
-	MDeformVert *dvert;
+	MDeformVert *dvert = NULL;
 	tGPspoint *point2D;
 
 	if (tgpf->sbuffer_size == 0) {
@@ -868,7 +868,6 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
 
 	/* add points */
 	pt = gps->points;
-	dvert = gps->dvert;
 	point2D = (tGPspoint *)tgpf->sbuffer;
 
 	const int def_nr = tgpf->ob->actdef - 1;
@@ -900,7 +899,7 @@ static void gpencil_stroke_from_buffer(tGPDfill *tgpf)
 			dvert++;
 		}
 		else {
-			if (gps->dvert != NULL) {
+			if (dvert != NULL) {
 				dvert->totweight = 0;
 				dvert->dw = NULL;
 				dvert++;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 63a580337c4..0e97c278707 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1158,7 +1158,7 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
 			pt->uv_fac = ptc->uv_fac;
 			pt->uv_rot = ptc->uv_rot;
 
-			if (gps->dvert != NULL) {
+			if (dvert != NULL) {
 				dvert->totweight = 0;
 				dvert->dw = NULL;
 				dvert++;



More information about the Bf-blender-cvs mailing list