]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix a bug in InspectionPanel
authorvsv <vsv@opencascade.com>
Wed, 11 Jul 2018 14:02:44 +0000 (17:02 +0300)
committervsv <vsv@opencascade.com>
Wed, 11 Jul 2018 14:02:57 +0000 (17:02 +0300)
src/XGUI/XGUI_InspectionPanel.cpp

index 1e2cd0bf098a0f5044ef53e1657cde225690c41e..682f74c5f5fa80013388628d3a13da1e28b41d07 100644 (file)
@@ -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);
   }