From d620d57a86a5d9b2260e7769c940149e34e9076c Mon Sep 17 00:00:00 2001 From: mpa Date: Thu, 9 Apr 2015 16:48:40 +0300 Subject: [PATCH] "Reduce Study" dialog box: bug fixing --- src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx index ba248c27a..d5e69e2ec 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx @@ -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() ); -- 2.39.2