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>2022-02-21 15:02:11 +0300
committerSybren A. Stüvel <sybren@blender.org>2022-02-21 15:02:23 +0300
commit132f9a2e318da5de7432c78fa3b3084c9ec38a40 (patch)
treeba55814ffb6b8e2eb84931af2a53c64d80cba83a /source/blender/blenkernel/intern
parentbce810f05763b3ccf9f7331e96541be2df38f29b (diff)
Fix T95596: Crash in versioning of node animation
The node animation versioning code passes `nullptr` to the `oldName` and `newName` parameters, but those weren't `NULL`-safe. I added an extra check for this. No functional changes, just a crash fix.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/anim_data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim_data.c b/source/blender/blenkernel/intern/anim_data.c
index 42b72a7cd66..84a1f979082 100644
--- a/source/blender/blenkernel/intern/anim_data.c
+++ b/source/blender/blenkernel/intern/anim_data.c
@@ -779,7 +779,7 @@ static bool fcurves_path_rename_fix(ID *owner_id,
if (fcu->rna_path != old_path) {
bActionGroup *agrp = fcu->grp;
is_changed = true;
- if ((agrp != NULL) && STREQ(oldName, agrp->name)) {
+ if (oldName != NULL && (agrp != NULL) && STREQ(oldName, agrp->name)) {
BLI_strncpy(agrp->name, newName, sizeof(agrp->name));
}
}