Fix T91236: AssetBrowser crash with certain collections
Caused by {rB5a9a16334c57} Linking/appending an asset made from a collection containing certain types of objects lacking bounding boxes (camera, light) would crash. Add simple bbox check to prevent the crash. Maniphest Tasks: T91236 Differential Revision: https://developer.blender.org/D12415
This commit is contained in:
parent
c2ce68a018
commit
2b4afcbb4c
Notes:
blender-bot
2023-02-14 06:45:14 +01:00
Referenced by issue #91236, Asset Browser: crash when linking/appending an asset made from a collection containing certain types of objects like a camera, a light... Referenced by issue #91242, Asset Browser: crash when the Object Info node is connected to the Group Output with certain types of objects
|
@ -5749,6 +5749,8 @@ void BKE_object_replace_data_on_shallow_copy(Object *ob, ID *new_data)
|
|||
ob->data = new_data;
|
||||
ob->runtime.geometry_set_eval = NULL;
|
||||
ob->runtime.data_eval = NULL;
|
||||
ob->runtime.bb->flag |= BOUNDBOX_DIRTY;
|
||||
if (ob->runtime.bb != NULL) {
|
||||
ob->runtime.bb->flag |= BOUNDBOX_DIRTY;
|
||||
}
|
||||
ob->id.py_instance = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue