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.
This commit is contained in:
Dalai Felinto
2017-06-06 12:47:47 +02:00
parent 47fd882e79
commit d267d76540

View File

@@ -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
}