From 68e5c082b8dc0472dc7c9d870c68497d88bc4f19 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 3 Jun 2017 02:21:10 +1000 Subject: Fix for crash/error drawing duplis Drawing object centers used stack memory, we don't want to draw these anyway so add check. --- source/blender/depsgraph/intern/depsgraph_query.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/depsgraph/intern') diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index c87d6fd99e0..4241325d571 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -100,6 +100,8 @@ Object *DEG_get_object(Depsgraph * /*depsgraph*/, Object *ob) /* ************************ DAG ITERATORS ********************* */ +#define BASE_FLUSH_FLAGS (BASE_FROM_SET | BASE_FROMDUPLI) + void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data) { SceneLayer *scene_layer; @@ -112,7 +114,7 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data data->eval_ctx = DEG_evaluation_context_new(DAG_EVAL_RENDER); data->scene = DEG_get_scene(graph); scene_layer = DEG_get_scene_layer(graph); - data->base_flag = ~(BASE_FROM_SET); + data->base_flag = ~BASE_FLUSH_FLAGS; Base base = {(Base *)scene_layer->object_bases.first, NULL}; data->base = &base; @@ -124,7 +126,7 @@ void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data */ static void deg_flush_data(Object *ob, Base *base, const int flag) { - ob->base_flag = (base->flag | BASE_FROM_SET | BASE_FROMDUPLI) & flag; + ob->base_flag = (base->flag | BASE_FLUSH_FLAGS) & flag; ob->base_collection_properties = base->collection_properties; ob->base_selection_color = base->selcol; } -- cgit v1.2.3