Fix T85587: Crash on selecting multiple frames

Blender would crash when selecting multiple keyframes while multiframe edit was
active. This was due to the active frame being NULL in some instances.

The fix checks if the active frame is not NULL.

Reviewed By: antoniov

Maniphest Tasks: T85587

Differential Revision: https://developer.blender.org/D10421
This commit is contained in:
Falk David 2021-02-15 20:29:52 +01:00
parent ae370e292a
commit c53022768b
Notes: blender-bot 2023-02-14 00:09:06 +01:00
Referenced by issue #85587, Grease Pencil crash selecting multiple frames with Multiframe enabled
1 changed files with 1 additions and 1 deletions

View File

@ -2605,7 +2605,7 @@ void BKE_gpencil_visible_stroke_iter(ViewLayer *view_layer,
sta_gpf = end_gpf = NULL;
/* Check the whole range and tag the editable frames. */
LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
if (gpf == act_gpf || (gpf->flag & GP_FRAME_SELECT)) {
if (act_gpf != NULL && (gpf == act_gpf || (gpf->flag & GP_FRAME_SELECT))) {
gpf->runtime.onion_id = 0;
if (do_onion) {
if (gpf->framenum < act_gpf->framenum) {