Skip to content

Commit

Permalink
Mesh::copy(): make it NOP if asked to copy a mesh onto itself (was
Browse files Browse the repository at this point in the history
crashing previously #218)
  • Loading branch information
BrunoLevy committed Feb 7, 2025
1 parent bd61abd commit 6f71cef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/geogram/mesh/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,9 @@ namespace GEO {
bool copy_attributes,
MeshElementsFlags what
) {
if(&rhs == this) {
return;
}
if((what & MESH_VERTICES) == 0) {
clear(false,false);
return;
Expand Down

0 comments on commit 6f71cef

Please sign in to comment.