Fix #117903: Copy as driver crash

The copy as driver function assumed that the path was allocated.
Generally we should avoid using `MEM_dupallocN` for reasons
like this.
This commit is contained in:
Hans Goudey
2024-02-06 13:11:03 -05:00
parent e1ee422d12
commit 42561c2a1c

View File

@@ -811,7 +811,7 @@ void ANIM_copy_as_driver(ID *target_id, const char *target_path, const char *var
target->idtype = GS(target_id->name);
target->id = target_id;
target->rna_path = static_cast<char *>(MEM_dupallocN(target_path));
target->rna_path = BLI_strdup(target_path);
/* Set the variable name. */
if (var_name) {