Fix T81214: Crash on Action constraint without action
A `NULL` pointer check was missing.
This commit is contained in:
parent
1f5331ee87
commit
f808f2a495
Notes:
blender-bot
2023-02-14 07:25:51 +01:00
Referenced by issue #81214, Crash on Action constraint without action
|
@ -239,6 +239,11 @@ bool BKE_animdata_action_ensure_idroot(const ID *owner, bAction *action)
|
|||
{
|
||||
const int idcode = GS(owner->name);
|
||||
|
||||
if (action == NULL) {
|
||||
/* A NULL action is usable by any ID type. */
|
||||
return true;
|
||||
}
|
||||
|
||||
if (action->idroot == 0) {
|
||||
/* First time this Action is assigned, lock it to this ID type. */
|
||||
action->idroot = idcode;
|
||||
|
|
Loading…
Reference in New Issue