{
// 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);
}