From ac23518712fa65e2ddf7d0b24e9a007a7083bf7b Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 23 Sep 2014 11:40:53 +0400 Subject: [PATCH] Correcting bug on distance creation --- src/SketchPlugin/SketchPlugin_Validators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SketchPlugin/SketchPlugin_Validators.cpp b/src/SketchPlugin/SketchPlugin_Validators.cpp index 855ac9ab0..43ac4fadd 100644 --- a/src/SketchPlugin/SketchPlugin_Validators.cpp +++ b/src/SketchPlugin/SketchPlugin_Validators.cpp @@ -22,7 +22,7 @@ bool SketchPlugin_DistanceAttrValidator::isValid(const FeaturePtr& theFeature, // If the object is not a line then it is accepted const ModelAPI_ResultValidator* aLineValidator = dynamic_cast(aFactory->validator("SketchPlugin_ResultLineValidator")); - if (!aLineValidator->isValid(theObject)) + if (aLineValidator && (!aLineValidator->isValid(theObject))) return true; // If it is a line then we have to check that first attribute id not a line -- 2.39.2