From 6074f62d1a099fc378aa25506a93321dba2d956b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Feb 2019 17:21:55 +1100 Subject: Fix T61353: Crash converting a curve to a mesh This was caused by curves pointing to each other creating a cyclic dependency. While the dependency graph detects this, generating a mesh for render recursively generates data which cashes in this case. Add in a check to detect cyclic links. Note, this bug exists in 2.7x too - but only crashes on render since 2.7x didn't use 'for_render' when converting data. --- source/blender/blenkernel/BKE_displist.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/BKE_displist.h') diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 3f9589ae341..c232234dd62 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -49,6 +49,7 @@ enum { /* prototypes */ struct Depsgraph; +struct LinkNode; struct ListBase; struct Main; struct Mesh; @@ -83,12 +84,15 @@ void BKE_displist_make_surf( struct Mesh **r_final, const bool for_render, const bool for_orco, const bool use_render_resolution); void BKE_displist_make_curveTypes( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, - const bool for_render, const bool for_orco); + const bool for_render, const bool for_orco, + struct LinkNode *ob_cyclic_list); void BKE_displist_make_curveTypes_forRender( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ListBase *dispbase, - struct Mesh **r_final, const bool for_orco, const bool use_render_resolution); + struct Mesh **r_final, const bool for_orco, const bool use_render_resolution, + struct LinkNode *ob_cyclic_list); void BKE_displist_make_curveTypes_forOrco( - struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ListBase *dispbase); + struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct ListBase *dispbase, + struct LinkNode *ob_cyclic_list); void BKE_displist_make_mball( struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob); void BKE_displist_make_mball_forRender( -- cgit v1.2.3