Fix T81214: Crash on Action constraint without action
A `NULL` pointer check was missing.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user