This is an old thread, but here is a solution which works for me:
ent_setmesh((p_Block)->Entity, NULL, 0, 0);
(p_Block->Mesh)->Release();
p_Block->Mesh = newMesh;
ent_setmesh(p_Block->Entity, newMesh, 0, 0);
Without
ent_setmesh((p_Block)->Entity, NULL, 0, 0); it crashes even when I put the
ent_setmesh(p_Block->Entity, newMesh, 0, 0); at the top instead.