diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-06-02 19:21:10 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-06-02 19:21:10 +0300 |
commit | 68e5c082b8dc0472dc7c9d870c68497d88bc4f19 (patch) | |
tree | 183596460451c264786785a3fd87ec4bd6e86fbd /source/blender/depsgraph/intern | |
parent | f6b9b452d8bb2424b11f5c80cb18ef2c37648558 (diff) |
Fix for crash/error drawing duplis
Drawing object centers used stack memory,
we don't want to draw these anyway so add check.
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |