]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Fix for the '52701: SIGSEGV in Mesh creation dialog box after activating Viscous...
authorrnv <rnv@opencascade.com>
Mon, 27 Apr 2015 11:52:23 +0000 (14:52 +0300)
committerrnv <rnv@opencascade.com>
Mon, 27 Apr 2015 11:52:23 +0000 (14:52 +0300)
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx

index c98495e8b39d543e0f75609ba2fbb01902465414..13ad359cd248974aa38d8df02cf00c968107664f 100644 (file)
@@ -551,9 +551,17 @@ void SMESHGUI_MeshOp::selectionDone()
         for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) {
           QString aSubGeomEntry = (*aSubShapesIter);
           _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data());
-          GEOM::GEOM_Object_var aSubGeomVar =
-            GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject());
-          aSeq[iSubSh] = aSubGeomVar;
+        
+         if( pSubGeom ) { 
+           SALOMEDS_SObject* sobj = _CAST(SObject,pSubGeom);
+           if( sobj ) {
+             GEOM::GEOM_Object_var aSubGeomVar =
+               GEOM::GEOM_Object::_narrow(sobj->GetObject());
+             if( !aSubGeomVar->_is_nil() ){
+               aSeq[iSubSh] = aSubGeomVar;
+             }
+           }
+         }
         }
       } else {
         // get geometry by selected sub-mesh
index af60f62de26cb5b67236e7ed58043d1d2e63865d..7b605972d31ea7d74f53b88e1e5028463df794b3 100644 (file)
@@ -134,6 +134,8 @@ StdMeshersGUI_SubShapeSelectorWdg::~StdMeshersGUI_SubShapeSelectorWdg()
     mySelectionMgr->removeFilter( myFilter );
   delete myFilter; myFilter=0;
 
+  mySelectionMgr->clearSelected();
+
   SUIT_SelectionFilter* filter;
   foreach( filter, myGeomFilters )
     delete filter;