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_4_0b1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd9e32113b1a9f206662ea1340f1b10c7305fa1e;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();