mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
PAL12147. prevent from SIGSEGV when creating elements on NULL nodes
This commit is contained in:
parent
d198800332
commit
be55a1922a
@ -195,7 +195,7 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
{
|
||||
SMDS_MeshFace * face=createTriangle(n1, n2, n3);
|
||||
|
||||
if (!registerElement(ID, face)) {
|
||||
if (face && !registerElement(ID, face)) {
|
||||
RemoveElement(face, false);
|
||||
face = NULL;
|
||||
}
|
||||
@ -246,7 +246,7 @@ SMDS_MeshFace* SMDS_Mesh::AddFaceWithID(const SMDS_MeshNode * n1,
|
||||
{
|
||||
SMDS_MeshFace * face=createQuadrangle(n1, n2, n3, n4);
|
||||
|
||||
if (!registerElement(ID, face)) {
|
||||
if (face && !registerElement(ID, face)) {
|
||||
RemoveElement(face, false);
|
||||
face = NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user