[Bf-blender-cvs] [a5f19e3f727] blender-v2.82-release: Fix T73265: GPencil console error when delete frist frame

Antonio Vazquez noreply at git.blender.org
Mon Jan 20 16:18:29 CET 2020


Commit: a5f19e3f7270b335d324c4fa5a9ca33e59376ef0
Author: Antonio Vazquez
Date:   Mon Jan 20 16:18:04 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBa5f19e3f7270b335d324c4fa5a9ca33e59376ef0

Fix T73265: GPencil console error when delete frist frame

===================================================================

M	source/blender/blenkernel/intern/gpencil.c

===================================================================

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 {



More information about the Bf-blender-cvs mailing list