From 874f1dec6fda90d351075a302c6356d78347fcb3 Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 16 Oct 2019 14:28:07 +0300 Subject: [PATCH] Issue #3048: Fatal error when create group using filter without argument --- src/FiltersPlugin/FiltersPlugin_OnPlaneSide.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); -- 2.39.2