From: azv Date: Wed, 16 Oct 2019 11:28:07 +0000 (+0300) Subject: Issue #3048: Fatal error when create group using filter without argument X-Git-Tag: V9_5_0a1~167^2~40 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=874f1dec6fda90d351075a302c6356d78347fcb3;p=modules%2Fshaper.git Issue #3048: Fatal error when create group using filter without argument --- diff --git a/src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp b/src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp index 54f8c9391..cfbdff381 100644 --- a/src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp +++ b/src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp @@ -42,8 +42,12 @@ bool FiltersPlugin_OnPlaneSide::isOk(const GeomShapePtr& theShape, const ResultP if (!aList.get()) return false; GeomShapePtr aPlanarShape = aList->value(); - if (!aPlanarShape) - aPlanarShape = aList->context()->shape(); + if (!aPlanarShape) { + ResultPtr aContext = aList->context(); + if (!aContext) + return false; + aPlanarShape = aContext->shape(); + } GeomPlanePtr aPlane = aPlanarShape->face()->getPlane(); GeomPointPtr aPlaneLoc = aPlane->location();