diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-27 17:29:45 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-07-27 17:29:45 +0300 |
commit | 9323182e73281d4329d682c640e636d3f4c681ff (patch) | |
tree | 94218b44937d2672fad049582e0eebd713e9c33f /source | |
parent | 03d258d61335cfca326543a3d13b082597cfba2a (diff) |
Prevent crash when duplicating object which doesn't have evaluated base properties yet
This mainly happens when copy on write is enabled.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 38534f03123..91fa01a9e0b 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -260,6 +260,9 @@ void BKE_collection_object_add_from(Scene *scene, Object *ob_src, Object *ob_dst for (SceneLayer *sl = scene->render_layers.first; sl; sl = sl->next) { Base *base_src = BKE_scene_layer_base_find(sl, ob_src); + if (base_src->collection_properties == NULL) { + continue; + } if (base_src != NULL) { Base *base_dst = BKE_scene_layer_base_find(sl, ob_dst); IDP_MergeGroup(base_dst->collection_properties, base_src->collection_properties, true); |