From ee666c70f6e62251122071d580ffbf8591af826b Mon Sep 17 00:00:00 2001 From: azv Date: Wed, 16 Jan 2019 09:55:32 +0300 Subject: [PATCH] Fix crash on changing parameters of 'galeries' model. Update model to change business parameters. --- src/FeaturesPlugin/FeaturesPlugin_Validators.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp index 7e0b51b93..0c9afd4a6 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp @@ -1345,9 +1345,12 @@ bool FeaturesPlugin_ValidatorBooleanSmashSelection::isValid( ResultPtr aContext = anAttrSelection->context(); std::shared_ptr aShape = anAttrSelection->value(); - GeomShapePtr aContextShape = aContext->shape(); if (!aShape.get()) { - aShape = aContextShape; + if (!aContext.get()) { + theError = "Error: Empty selection."; + return false; + } + aShape = aContext->shape(); } if (aShape->isSolid() || aShape->isCompSolid()) { -- 2.39.2