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
This commit is contained in:
parent
4d8018948d
commit
3e8bd1f6e4
Notes:
blender-bot
2023-02-14 05:37:19 +01:00
Referenced by issue #100040, Crash with rescaling reference image and apply scale Referenced by issue #98661, 3.2: Potential candidates for corrective releases
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue