Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/anim_data.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c
index eb2cdf585c4..e7c6e00a61f 100644
--- a/source/blender/blenkernel/intern/anim_data.c
+++ b/source/blender/blenkernel/intern/anim_data.c
@@ -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;