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:
authorSybren A. Stüvel <sybren@blender.org>2020-09-28 12:23:34 +0300
committerSybren A. Stüvel <sybren@blender.org>2020-09-28 12:23:34 +0300
commitf808f2a4950a99f74780ea87e9d62ee36bc4ff35 (patch)
treec4e9b22c2d3a52dbfb0d7444eff070b0cc98a0e7
parent1f5331ee87018cb51a029d786ef138653815e56e (diff)
Fix T81214: Crash on Action constraint without action
A `NULL` pointer check was missing.
-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;