diff options
author | Pratik Borhade <PratikPB2123> | 2022-08-01 18:07:56 +0300 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2022-08-02 12:33:30 +0300 |
commit | 80d193c51b460cff302ffff66efb4530bef6b6fd (patch) | |
tree | 556f62043648328dbc22c93993a99b2074dce378 | |
parent | ae4593179745d55e93036902d3fd15045933a253 (diff) |
Fix T100040: Crash when transform applied on multi-user image
Affected by rB8621fdb10dc4
Crash if single-user data is created when we apply transform
on multi-user image data. Crash occurs because creation of new copy
was not handled in `single_obdata_users` for empty objects (image for example)
Reviewed By: dfelinto, mont29
Maniphest Tasks: T100040
Differential Revision: https://developer.blender.org/D15587
-rw-r--r-- | source/blender/editors/object/object_relations.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 111f3b6bf92..7df9f084640 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1822,6 +1822,11 @@ static void single_obdata_users( DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); switch (ob->type) { + case OB_EMPTY: + ob->data = ID_NEW_SET( + ob->data, + BKE_id_copy_ex(bmain, ob->data, NULL, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS)); + break; case OB_LAMP: ob->data = la = ID_NEW_SET( ob->data, |