Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/smesh.git] / src / SMDS / SMDS_MeshGroup.cxx
index 0cb481c501c0c38f13c2bd9d966c274625c271fd..e003c9219d25d559edd4428937abfaaaa8785eb7 100644 (file)
@@ -16,7 +16,7 @@
 //  License along with this library; if not, write to the Free Software 
 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
 // 
-//  See http://www.opencascade.org or email : webmaster@opencascade.org 
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 //
 //
@@ -124,8 +124,10 @@ void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem)
 {
        // the type of the group is determined by the first element added
        if (myElements.empty()) myType = theElem->GetType();
-       else if (theElem->GetType() != myType)
+       else if (theElem->GetType() != myType) {
          MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<<theElem->GetType()<<"!="<<myType);
+         return;
+       }
        
        myElements.insert(theElem);
 }