From ab6fb02dc3081829675b4cb9794de624bf02376e Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 11 Dec 2017 09:45:08 +0300 Subject: [PATCH] Center presentation validation: check interactive object on NULL --- src/PartSet/PartSet_WidgetShapeSelector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PartSet/PartSet_WidgetShapeSelector.cpp b/src/PartSet/PartSet_WidgetShapeSelector.cpp index 056ca9dd6..c983d7425 100755 --- a/src/PartSet/PartSet_WidgetShapeSelector.cpp +++ b/src/PartSet/PartSet_WidgetShapeSelector.cpp @@ -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); -- 2.39.2