Suppress assert for meshes with no faces
This commit is contained in:
parent
678a6b6c49
commit
f8ea2c92db
Notes:
blender-bot
2023-02-14 07:25:51 +01:00
Referenced by issue #51694, Tangent related crash (assert) when deleting all verts in Eevee
|
@ -538,7 +538,9 @@ static MeshRenderData *mesh_render_data_create(Mesh *me, const int types)
|
|||
/* note: BKE_editmesh_loop_tangent_calc calculates 'CD_TANGENT',
|
||||
* not 'CD_MLOOPTANGENT' (as done below). It's OK, they're compatible. */
|
||||
rdata->cd.layers.tangent[i] = CustomData_get_layer_n(&rdata->cd.output.ldata, CD_TANGENT, i);
|
||||
BLI_assert(rdata->cd.layers.tangent[i] != NULL);
|
||||
if (rdata->tri_len != 0) {
|
||||
BLI_assert(rdata->cd.layers.tangent[i] != NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue