diff options
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 98c8f46970f..b1cf8ad8570 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -939,9 +939,15 @@ bGPDframe *BKE_gpencil_layer_getframe(bGPDlayer *gpl, int cframe, eGP_GetFrame_M gpl->actframe = gpf; } else { - /* unresolved errogenous situation! */ - CLOG_STR_ERROR(&LOG, "cannot find appropriate gp-frame"); - /* gpl->actframe should still be NULL */ + /* If delete first frame, need to find one. */ + if (gpl->frames.first != NULL) { + gpl->actframe = gpl->frames.first; + } + else { + /* unresolved errogenous situation! */ + CLOG_STR_ERROR(&LOG, "cannot find appropriate gp-frame"); + /* gpl->actframe should still be NULL */ + } } } else { |