]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Correcting bug on distance creation
authorvsv <vitaly.smetannikov@opencascade.com>
Tue, 23 Sep 2014 07:40:53 +0000 (11:40 +0400)
committervsv <vitaly.smetannikov@opencascade.com>
Tue, 23 Sep 2014 07:40:53 +0000 (11:40 +0400)
src/SketchPlugin/SketchPlugin_Validators.cpp

index 855ac9ab0584a88b7e92713fce7b8f9127f854cb..43ac4faddf82407798cb701a6ddf048fb4175563 100644 (file)
@@ -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<const ModelAPI_ResultValidator*>(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