From: vsv Date: Wed, 11 Jul 2018 14:02:44 +0000 (+0300) Subject: Fix a bug in InspectionPanel X-Git-Tag: SHAPER_V9_1_0RC1~133 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a0b7f94fc4ba4455512b4394a19a5751a16a4a4c;p=modules%2Fshaper.git Fix a bug in InspectionPanel --- diff --git a/src/XGUI/XGUI_InspectionPanel.cpp b/src/XGUI/XGUI_InspectionPanel.cpp index 1e2cd0bf0..682f74c5f 100644 --- a/src/XGUI/XGUI_InspectionPanel.cpp +++ b/src/XGUI/XGUI_InspectionPanel.cpp @@ -178,9 +178,10 @@ void XGUI_InspectionPanel::onSelectionChanged() aSelection->getSelected(ModuleBase_ISelection::Viewer); if (aSelectedList.count() > 0) { ModuleBase_ViewerPrsPtr aPrs = aSelectedList.first(); - setName(XGUI_Tools::generateName(aPrs)); - TopoDS_Shape aShape = ModuleBase_Tools::getSelectedShape(aPrs); + if (aShape.IsNull()) + return; + setName(XGUI_Tools::generateName(aPrs)); setShapeContent(aShape); setShapeParams(aShape); }