GPencil: Fix unreported crash in some cases when duplicate a stroke

Some pointers were not initialized.
This commit is contained in:
Antonio Vazquez 2020-11-14 15:16:02 +01:00
parent a3ce05d00e
commit b6041bfc6c
1 changed files with 4 additions and 0 deletions

View File

@ -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);