From a0b7f94fc4ba4455512b4394a19a5751a16a4a4c Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 11 Jul 2018 17:02:44 +0300 Subject: [PATCH] Fix a bug in InspectionPanel --- src/XGUI/XGUI_InspectionPanel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.39.2