]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Center presentation validation: check interactive object on NULL
authornds <nds@opencascade.com>
Mon, 11 Dec 2017 06:45:08 +0000 (09:45 +0300)
committernds <nds@opencascade.com>
Mon, 11 Dec 2017 06:45:08 +0000 (09:45 +0300)
src/PartSet/PartSet_WidgetShapeSelector.cpp

index 056ca9dd6ea1d770a31e21b44961c7723b305cb4..c983d74252247b1419c8b4b584623be430192582 100755 (executable)
@@ -77,7 +77,8 @@ bool PartSet_WidgetShapeSelector::activateSelectionAndFilters(bool toActivate)
 bool PartSet_WidgetShapeSelector::isValidSelectionCustom(const ModuleBase_ViewerPrsPtr& thePrs)
 {
   bool aValid = false;
-  if (thePrs.get() && thePrs->interactive()->IsKind(STANDARD_TYPE(PartSet_CenterPrs)))
+  if (thePrs.get() && thePrs->interactive().get() &&
+      thePrs->interactive()->IsKind(STANDARD_TYPE(PartSet_CenterPrs)))
     aValid = true; // we should not check acceptSubShape for such presentation
   else
     aValid = ModuleBase_WidgetShapeSelector::isValidSelectionCustom(thePrs);