diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-09-07 14:03:06 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-09-07 14:22:04 +0300 |
commit | 2b4afcbb4cdc231aebe343cd444d001b9f191204 (patch) | |
tree | b7aee8ceed3841befd4b7e9d2a97eb85ed870ee3 /source/blender/blenkernel/intern | |
parent | c2ce68a0187ff8d6c8d0beafa0a3d655899a1d8f (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 4fa211604bc..394245b3a2c 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -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; } |