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:
authorPratik Borhade <PratikPB2123>2022-08-01 18:07:56 +0300
committerDalai Felinto <dalai@blender.org>2022-08-01 18:16:30 +0300
commit3e8bd1f6e479fd5dad5d75af59ceb929e7017114 (patch)
treecc2eece4097025f486b649d6ae2e0fcec1bf6ba3 /source/blender/editors
parent4d8018948ddb2952a7daa57adb6c460717a0ff6e (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
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_relations.c5
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 01042824aac..f136d3302df 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1830,6 +1830,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,