Fix T81214: Crash on Action constraint without action

A `NULL` pointer check was missing.
This commit is contained in:
Sybren A. Stüvel
2020-09-28 11:23:34 +02:00
parent 1f5331ee87
commit f808f2a495

View File

@@ -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;