Salome HOME
Center presentation validation: check interactive object on NULL
[modules/shaper.git] / 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);