diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 1ad00533a..dcb5d7b1a 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -1954,6 +1954,7 @@ bool MultiConnection2D::Value::operator<(const MultiConnection2D::Value& x) cons } void MultiConnection2D::GetValues(MValues& theValues){ + if ( !myMesh ) return; SMDS_FaceIteratorPtr anIter = myMesh->facesIterator(); for(; anIter->more(); ){ const SMDS_MeshFace* anElem = anIter->next(); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 1fc82405f..8c1813f56 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -1555,7 +1555,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, hypIndex = this->find( curHyp, myExistingHyps[ dim ][ type ]); else hypIndex = -1; - if ( !isSubmesh && hypIndex < 0 && anExisting.count() == 1 ) { + if ( !isSubmesh && myToCreate && hypIndex < 0 && anExisting.count() == 1 ) { // none is yet selected => select the sole existing if it is not optional CORBA::String_var hypTypeName = myExistingHyps[ dim ][ type ].first().first->GetName(); bool isOptional = true; diff --git a/src/SMESHGUI/SMESHGUI_Utils.h b/src/SMESHGUI/SMESHGUI_Utils.h index d5ec25ed4..5ac9ee97c 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.h +++ b/src/SMESHGUI/SMESHGUI_Utils.h @@ -204,7 +204,7 @@ SMESHGUI_EXPORT struct toQStr : public toStrT< QString > { toQStr( char* s ): toStrT< QString >(s) {} }; - class toStdStr : public toStrT< std::string > { + struct toStdStr : public toStrT< std::string > { toStdStr( char* s ): toStrT< std::string >(s) {} };