From af7233368de4eee5b7f0e34b0ff77436d4f9b312 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 31 Aug 2021 11:40:02 +0200 Subject: Fix T91060: GPencil Time Offset Modifier breaks evaluation time Caused by {rBf3bf87e5887c}. When using a GPencil Time Offset Modifier, the bGPDlayer>actframe can be NULL. This can be determined though, but above optimization commit skipped getting the active frame in this case entirely (with the intention to only get it if framenumbers did not match). Now also call BKE_gpencil_layer_frame_get() if actframe is NULL in order to fetch a valid one if present. Maniphest Tasks: T91060 Differential Revision: https://developer.blender.org/D12355 --- source/blender/blenkernel/intern/gpencil_modifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index eac6a05d33a..a30376b9bad 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -719,7 +719,7 @@ static void gpencil_copy_activeframe_to_eval( bGPDframe *gpf_orig = gpl_orig->actframe; int remap_cfra = gpencil_remap_time_get(depsgraph, scene, ob, gpl_orig); - if (gpf_orig && gpf_orig->framenum != remap_cfra) { + if ((gpf_orig == NULL) || (gpf_orig && gpf_orig->framenum != remap_cfra)) { gpf_orig = BKE_gpencil_layer_frame_get(gpl_orig, remap_cfra, GP_GETFRAME_USE_PREV); } -- cgit v1.2.3