[Bf-blender-cvs] [b6041bfc6c7] master: GPencil: Fix unreported crash in some cases when duplicate a stroke
Antonio Vazquez
noreply at git.blender.org
Sat Nov 14 15:16:55 CET 2020
Commit: b6041bfc6c782ae98fb06ff285d40059778eb48a
Author: Antonio Vazquez
Date: Sat Nov 14 15:16:02 2020 +0100
Branches: master
https://developer.blender.org/rBb6041bfc6c782ae98fb06ff285d40059778eb48a
GPencil: Fix unreported crash in some cases when duplicate a stroke
Some pointers were not initialized.
===================================================================
M source/blender/blenkernel/intern/gpencil.c
===================================================================
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 9d3582b2df2..44992bee000 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -933,6 +933,10 @@ bGPDstroke *BKE_gpencil_stroke_duplicate(bGPDstroke *gps_src,
gps_dst->dvert = NULL;
}
}
+ else {
+ gps_dst->points = NULL;
+ gps_dst->dvert = NULL;
+ }
if (dup_curve && gps_src->editcurve != NULL) {
gps_dst->editcurve = BKE_gpencil_stroke_curve_duplicate(gps_src->editcurve);
More information about the Bf-blender-cvs
mailing list