Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r--source/blender/blenkernel/intern/gpencil.c12
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 {