diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-12 03:12:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-12 03:16:56 +0300 |
commit | b87b6e8e289cdc15c730341d840ca5fd9836a430 (patch) | |
tree | f17a9d53416b6a8893d1446baa816288e0fe330e /source/blender | |
parent | 6871402614f48ef9c454d057c544ed43abeb87ae (diff) |
Fix T59211: Edit-mesh display crashes
Caused by ae1f563899de4
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_mesh.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 508f3d6da69..9438995ec6f 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -949,20 +949,19 @@ static MeshRenderData *mesh_render_data_create_ex( } /* Warning replace mesh pointer. */ -#define MBC_GET_FINAL_MESH(mesh) do { \ +#define MBC_GET_FINAL_MESH(me) \ /* Hack to show the final result. */ \ - const bool use_em_final = ( \ - (mesh)->edit_btmesh && \ - (mesh)->edit_btmesh->mesh_eval_final && \ - ((mesh)->edit_btmesh->mesh_eval_final->runtime.is_original == false)); \ - Mesh me_fake; \ - if (use_em_final) { \ - me_fake = *(mesh)->edit_btmesh->mesh_eval_final; \ - me_fake.mat = (mesh)->mat; \ - me_fake.totcol = (mesh)->totcol; \ - (mesh) = &me_fake; \ - } \ -} while (0) + const bool _use_em_final = ( \ + (me)->edit_btmesh && \ + (me)->edit_btmesh->mesh_eval_final && \ + ((me)->edit_btmesh->mesh_eval_final->runtime.is_original == false)); \ + Mesh _me_fake; \ + if (_use_em_final) { \ + _me_fake = *(me)->edit_btmesh->mesh_eval_final; \ + _me_fake.mat = (me)->mat; \ + _me_fake.totcol = (me)->totcol; \ + (me) = &_me_fake; \ + } ((void)0) static void mesh_render_data_free(MeshRenderData *rdata) { |