From: vsv Date: Tue, 23 Sep 2014 07:40:53 +0000 (+0400) Subject: Correcting bug on distance creation X-Git-Tag: V_0.4.4~32^2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ac23518712fa65e2ddf7d0b24e9a007a7083bf7b;p=modules%2Fshaper.git Correcting bug on distance creation --- 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