Fix T73265: GPencil console error when delete frist frame
This commit is contained in:
parent
4dbaee0293
commit
a5f19e3f72
Notes:
blender-bot
2023-02-14 11:34:30 +01:00
Referenced by issue #73265, Grease Pencil Delete Active Frame operator throws error to console when first frame Referenced by issue #71971, Inset with depth and offset relative has weird geometry and assert crash
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue