]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
"Reduce Study" dialog box: bug fixing
authormpa <mpa@opencascade.com>
Thu, 9 Apr 2015 13:48:40 +0000 (16:48 +0300)
committermpa <mpa@opencascade.com>
Thu, 9 Apr 2015 13:48:40 +0000 (16:48 +0300)
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx

index ba248c27a6dd982a8b39031b928be9cfb672a6eb..d5e69e2ec838fdc6dd03e3cb1fc33bbeec6bd96f 100644 (file)
@@ -282,7 +282,10 @@ GEOMToolsGUI_TreeWidgetItem* GEOMToolsGUI_ReduceStudyDlg::addSubObject( QTreeWid
 {
   GEOMToolsGUI_TreeWidgetItem* item;
   if( !theObject->IsMainShape() ) {
-    GEOMToolsGUI_TreeWidgetItem* parentItem = addSubObject( theWidget, theObjects, theObject->GetMainShape() );
+    GEOM::GEOM_Object_var aMainShape = theObject->GetMainShape();
+    if ( CORBA::is_nil( aMainShape ) )
+      return NULL;
+    GEOMToolsGUI_TreeWidgetItem* parentItem = addSubObject( theWidget, theObjects, aMainShape );
     item = findObjectInTree( theWidget, theObject );
     if( !item )
       item = new GEOMToolsGUI_TreeWidgetItem( parentItem, QStringList() << theObject->GetName(), theObject->GetStudyEntry() );