diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-06-06 13:47:47 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-06-06 13:48:12 +0300 |
commit | d267d76540d0adecee75346d6cfe2fa6a69478c8 (patch) | |
tree | 3f3490fa1d1fe613484fb118a285a59561b345f0 /source | |
parent | 47fd882e79f337a90a66f8b9a21bfe92c7e5f25e (diff) |
Force crash on depsgraph iterator wrong access.
Related to T51718, so it crashes even when no fancy ASAN flags are used.
Patch suggestion by Campbell Barton.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_query.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index 1179575f716..d889dccfede 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -228,4 +228,9 @@ void DEG_objects_iterator_end(BLI_Iterator *iter) if (data->eval_ctx != NULL) { DEG_evaluation_context_free(data->eval_ctx); } + +#ifdef DEBUG + /* Force crash in case the iterator data is referenced and accessed down the line. (T51718) */ + memset(&data->temp_dupli_object, 0xFF, sizeof(data->temp_dupli_object)); +#endif } |