From 678de4142350bfc98a286d86da3968de20ce01ab Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 17 Jun 2022 19:02:28 +0300 Subject: [PATCH] bos #30314 EDF 25565 - Strange behavior on a specific case Avoid SIGSEGV when returning NULL instead of an empty list --- src/SMESH_I/SMESH_MeshEditor_i.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index e87f092a2..71106151f 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -3664,7 +3664,7 @@ SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::smIdType_array& theIDsOfEle << theIDsOfElements << ", " << theVector << " )"; } - return aGroups; + return aGroups ? aGroups : new SMESH::ListOfGroups(); } //======================================================================= @@ -3689,7 +3689,7 @@ SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObjec << theObject << ", " << theVector << " )"; } - return aGroups; + return aGroups ? aGroups : new SMESH::ListOfGroups(); } //======================================================================= @@ -3914,7 +3914,7 @@ SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::smIdType_array& theIDsOfElemen << theAxis << ", " << TVar( theAngle ) << " )"; } - return aGroups; + return aGroups ? aGroups : new SMESH::ListOfGroups(); } //======================================================================= @@ -3941,7 +3941,7 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject, << theAxis << ", " << TVar( theAngle ) << " )"; } - return aGroups; + return aGroups ? aGroups : new SMESH::ListOfGroups(); } //======================================================================= -- 2.30.2