Fix T78134: GPencil interpolation crash

Need to verify active frame not NULL.
This commit is contained in:
Antonio Vazquez 2020-06-22 19:09:11 +02:00
parent 25d2222c30
commit 9fbbd25e2a
Notes: blender-bot 2023-02-14 12:01:57 +01:00
Referenced by issue #78134, GPencil: interpolation tool crash
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 4 additions and 2 deletions

View File

@ -267,8 +267,10 @@ static void gp_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi)
/* Untag strokes to be sure nothing is pending. This must be done for
* all layer because it could be anything tagged and it would be removed
* at the end of the process when all tagged strokes are removed. */
gp_interpolate_untag_strokes(gpl->actframe);
gp_interpolate_untag_strokes(gpl->actframe->next);
if (gpl->actframe != NULL) {
gp_interpolate_untag_strokes(gpl->actframe);
gp_interpolate_untag_strokes(gpl->actframe->next);
}
/* all layers or only active */
if (!(tgpi->flag & GP_TOOLFLAG_INTERPOLATE_ALL_LAYERS) && (gpl != active_gpl)) {